The Maoists have been pushing for Mr Koirala to go
Nepal's interim Prime Minister, Girija Prasad Koirala, has announced that he has resigned.
Correspondents say the move paves the way for the former rebel leader, Prachanda, who heads the Maoist party, to succeed Mr Koirala.
The Maoists emerged as the biggest party in elections in April to a new constituent assembly.
The Maoists signed a peace deal in 2006, ending a decade of civil war in which thousands of people were killed.
"I announce in this house that I have abandoned the post of the prime minister," Mr Koirala told the constituent assembly on Thursday.
Prachanda could well become prime minister
He urged Nepal's fractious parties to "maintain the culture of consensus".
Mr Koirala has been struggling to keep his administration together after Maoist ministers submitted their resignations last week.
His interim cabinet has been beset by bitter disagreements.
The BBC's Charles Haviland in Nepal says Mr Koirala announced his resignation under pressure from the Maoists, but he is likely to continue in a caretaker capacity for some time.
According to the current constitution, the prime minister cannot tender his resignation to the assembly, only to the head of state.
Nepal, now a republic, will only get a head of state once the assembly has chosen a president and that cannot happen before a constitutional change, our correspondent says.
As Mr Koirala told the assembly, everyone in Nepal is confused about the political labyrinth the country now stands in.
Our correspondent says in the medium term, Mr Koirala appears to want the president's post.
His party loyalists say he is a necessary counterweight to the Maoists who are likely to lead the government and whose lower ranks are still engaged in acts of violence.
But Mr Koirala, a five-times prime minister, has plenty of critics, too, who say Nepalese politics is badly in need of some younger blood.
'Unfit for office'
The former Maoist rebels have accused Mr Koirala of clinging to his post after his Nepali Congress Party came a poor second in the April elections. They say the 84-year-old prime minister is unfit for office.
The political instability in Nepal has been exacerbated by constitutional changes pushed through in December which did not clarify how power would be divided between the president and prime minister once the new constituent assembly had abolished the monarchy.
In recent weeks it was finally agreed that the president would be largely ceremonial but would also be commander-in-chief of the army.
The Nepali Congress and the Maoists agreed this week that the candidates for president and prime minister would be decided by a vote in the assembly. That process still has to be agreed by other parties in parliament.
Mr Koirala was appointed prime minister in April 2006 when King Gyanendra was forced to abandon absolute rule in the face of weeks of growing street protests.
Later that year the Maoists, who had been fighting for a communist republic, declared an end to their insurgency. They joined the interim government in 2007.
The monarchy was finally abolished last month.