Nepal's prime minister resigned on Sunday minutes before a no-confidence vote in parliament that he was expected to lose after a key party withdrew support from the coalition government.
Prime Minister Khadga Prasad Sharma Oli, who had been in office for nine months, told parliament in a speech before the scheduled vote that he had handed in his resignation to President Bidhya Devi Bhandari.
He said he was "broken-hearted."
The president accepted the premier's resignation and directed Oli's government to function as a caretaker until a new administration is in place.
But the timeline for that is unclear as the Himalayan country is once again thrown into political turmoil.
The motion against the government was registered last week and was brought by coalition partner, Unified Maoist, and the key opposition party, Nepali Congress.
The opposition said that Oli should resign because he no longer has a majority after Unified Maoist pulled out of the government.
Unified Maoist chief Pushpa Kamal Dahal was expected to seek the support of the Nepali Congress and other parties to form a new coalition government.
Parliamentarians from Nepali Congress earlier said that the government needed to step down because it has proved itself to be "inept."
The government has shown significant delays in dealing with the reconstruction process in the aftermath of earthquakes in the Himalayan country and issues related to implementing its new constitution.
Oli became prime minister in October after gaining a two-thirds majority with Maoist support.
The government also came under fire for being unable to address the demands of the Madheshi community in the south, who waged a month of protests against the new constitution last year and imposed a border blockade. At least 50 people were killed in the protests.