The Soviet Union supported Bangladesh and Indian armies, as well as the Mukti Bahini during the war, recognising that the independence of Bangladesh would weaken the position of its rivals—the United States and the People's Republic of China. It gave assurances to India that if a confrontation with the United States or China developed, the USSR would take countermeasures. This was enshrined in the Indo-Soviet friendship treaty signed in August 1971. The Soviets also sent a nuclear submarine to ward off the threat posed by USS "Enterprise" in the Indian Ocean.