The Prime Minister of Nepal, Surya Bahadur Thapa, has announced he is leaving office.
Thapa said he hoped his move would help bring "lasting peace"
King Gyanendra has accepted the resignation and consultations are under way to find a successor.
The king, who dissolved the elected government in 2002 and assumed executive powers, appointed Mr Thapa 11 months ago.
Opposition parties have mounted massive demonstrations over the past year demanding the government be dismissed.
Mr Thapa said in a nationwide broadcast on Friday: "I have decided to submit my resignation to His Majesty the King with effect from today.
"I hope my resignation will pave the way for building a national consensus and help establish lasting peace in the country."
His broadcast also attacked opposition parties for their "stubborn stance".
"Clashes and controversy intensified and all these have threatened to jeopardise the constitution, democracy and the very interests of the nation," he said.
The king has reportedly asked Mr Thapa to continue in office until a successor is appointed.
A palace statement said the king was looking for someone with a "clean image to become the prime minister who can
form a government that can restore peace and conduct elections this year".
Mr Thapa, 76, was the second prime minister to be appointed since the king assumed executive power in October 2002.
Mr Thapa's whole tenure has been marked by street demonstrations organised by leading political parties.
They want either the reinstatement of the dissolved parliament or an all-party government comprising their nominees.
Bharat Mohan Adhikari, leader of the Nepal Communist Party-United Marxist and Leninist (NCP-UML), one of the main parties spearheading the demonstrations, expressed delight at the resignation.
"The first step of our movement has been successful with the removal of Prime Minister Thapa," he said.
Mr Thapa's tenure has been plagued by street demonstrations
"A conducive atmosphere has been created for dialogue with the king."
Sushil Koirala, vice president of the opposition Nepali Congress, said: "The resignation has opened up the road for talks with the king, but there are still many more issues that need to be addressed before we cease our protests."
A palace spokesman said the king was prepared to hold talks with all opposition groups.
"It is now up to them to come and hold a meeting with His Majesty," he said.
The BBC's Charles Haviland in Kathmandu says the latest move now puts the ball in the opposition's court and may lay bare their internal differences.
He says the opposition parties may now have to find a figure, perhaps in consultation with the king, they can all agree upon for the top job, which may not be easy.
The parties have already ruled out the king's offer of fresh elections at this stage, saying Nepal's security situation makes this impossible.
Mr Thapa's resignation comes a day after a crucial meeting of international donors ended without reaching an agreement on aid, on which Nepal is heavily reliant.
The donors had warned that Nepal must work towards restoring democracy.