 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.