Nepal's Maoist rebels and a coalition of seven opposition parties have agreed on a programme to end direct rule by King Gyanendra.
The king is accused of being 'tyrannical'
The king seized power in February, accusing the country's politicians of being incapable of ending the rebels' long-running insurgency.
Former prime minister Girija Prasad Koirala said the deal would come into effect once the rebels gave up arms.
Some 12,000 people have died in Nepal's 10-year civil war.
"The country's seven agitating party alliance and the Maoists have agreed to a 12-point agenda to establish full-fledged democracy," Mr Koirala told journalists in the capital, Kathmandu, the AFP news agency reports.
Mr Koirala leads Nepal's biggest political party
The move, he said, would "end the tyrannical monarchy" and culminate in elections supervised by the United Nations for a new constituent assembly.
Correspondents say the opposition political parties are not demanding an end to the monarchy, but that its powers once again be limited.
The Maoists have been fighting for the abolition of the monarchy and a communist republic.
Mr Koirala made one important proviso about the agreement: "The two sides will not launch the joint movement until the Maoists surrender their arms."
The Maoists' leader, Prachanda, sent an e-mail to media organisations in which he also gave details of the agreement.
The e-mail made no mention of the goal of a communist republic.
On the armed conflict, Prachanda said that the Maoists would be willing to place themselves under the supervision of the United Nations or another credible international organisation ahead of elections to a constituent assembly.