Vajpayee was arrested along with several other opposition leaders during the Internal Emergency imposed by Prime Minister Indira Gandhi in 1975. Initially interned in Bangalore, Vajpayee appealed his imprisonment on the grounds of bad health, and was moved to a hospital in Delhi. Gandhi ended the state of emergency in 1977. A coalition of parties, including the BJS, came together to form the Janata Party, which won the 1977 general elections. Morarji Desai, the chosen leader of the alliance, became the prime minister. Vajpayee served as the Minister of External Affairs, or foreign minister, in Desai's cabinet. As foreign minister, Vajpayee became the first person in 1977 to deliver a speech to the United Nations General Assembly in Hindi.