In 1988 his [Shekhar's] Janata Party merged with several other opposition parties to form the Janata Dal Party under the leadership of V.P. Singh, who subsequently became prime minister. After leading an internal rebellion against Singh, Shekhar broke with the Janata Dal Party on 5 November 1990, and quickly formed the Janata Dal–Socialist faction. With the support of Rajiv Gandhi's Congress (I) Party, he replaced Singh as India's prime minister on 10 November 1990, as head of a weak minority government. He resigned on 6 March 1991, after the Congress (I) Party withdrew its support, but he remained in office as a caretaker until national legislative elections could be held in May and June; he was eventually replaced by P. V. Narasimha Rao.