by the Janata alliance, later Janata Party as their parliamentary leader, and thus became the first non-Congress Prime Minister of India. Prime Minister of India (1977-1979) As a Prime Minister In January 1977, Indira Gandhi dissolved the Lok Sabha and declared that elections to the body were to be held during March 1977. Opposition leaders were also released and promptly formed the Janata alliance to fight the elections. The alliance registered a landslide victory in the election. On the urging of Jayaprakash Narayan, the Janata alliance selected Desai as their parliamentary leader and thus the Prime Minister. Foreign policy Desai restored normal relations with China, for the first time since the 1962 war. He also communicated with the military ruler of Pakistan, General Zia-ul-Haq and established friendly relations. Despite his pacifist leanings, he refused to sign the non-nuclear proliferation treaty despite the threat of stopping supply of uranium for power plants by the USA Congress. Nuclear programme Domestically, Desai played a crucial role in the Indian nuclear program after it was targeted by major nuclear powers after India conducted a surprise nuclear test in 1974. Desai kept India's nuclear reactors stating "they will never be used for atomic bombs, and I will see to it if I can help it". Internationally, he reaffirmed India's stand that it would not manufacture nuclear weapons and would refrain from conducting even peaceful nuclear explosions. In 1977, the Carter administration offered to sell heavy water and uranium to India for its nuclear reactors but required American on-site inspection of nuclear materials. Desai declined, seeing the American stance as contradictory, in light of its own nuclear arsenal. Decimation of R&AW Desai had described the Research and Analysis Wing (R&AW), India's external intelligence agency, as the praetorian guard of Indira Gandhi and had promised to stop all activities of the R&AW after becoming prime minister. He closed down much of the agency, and reduced its budget and operations, such as closing its Information Division. B. Raman, the former head of the Counter-Terrorism Division of R&AW and noted security analyst, revealed that in an informal discussion, Desai indiscreetly told Pakistan's Chief Martial Law Administrator General Zia ul-Haq that his government was well aware of Pakistan's nuclear development. Intra-party squabbles and collapse of Janata government His government undid many amendments made to the constitution during emergency and made it more difficult for any future government to impose a