Nepal's government and Maoist rebels declared a formal end to a decade-old civil war on Tuesday in an accord they called a victory for peace and democracy in one of the world's poorest countries.
Nepalis lit candles outside their doors in Kathmandu to celebrate after Prime Minister Girija Prasad Koirala and Maoist rebel leader Pushpa Kamal Dahal, known as Prachanda, signed the deal to end a conflict that has killed more than 13,000 people.
It comes seven months after King Gyanendra returned power to the country's main political parties following weeks of often violent street protests.
"The government of Nepal and the Communist Party of Nepal-Maoist have agreed to convert the ongoing ceasefire into a permanent truce and declare that the war which began in February 1996 is over," said the accord, written in Nepali.
The deal paves the way for the insurgents to hand over their arms and be confined to UN-monitored camps in the run-up to elections for an assembly that will draft a new constitution and decide the future of the monarchy.
It also clears the way for the insurgents to join an interim government that will oversee the elections, and for the rebels to take seats with elected politicians in an interim parliament.
The rebels have been fighting to abolish Nepal's more than 200-year-old monarchy and say the assembly vote satisfies their key demand. They have vowed to honour the outcome even if the assembly decides to maintain a ceremonial monarch.
The rebels and government have observed a ceasefire for more than six months, but human rights groups say extortion and conscription by the rebels have continued or even accelerated.
On Tuesday, both sides renewed a commitment to uphold human rights, respect international humanitarian laws, and end extortion, intimidation, kidnapping and disappearances.
"This is a day of victory for Nepal and its people's aspirations for change, and a day of defeat for those who wanted to exploit the people," Prachanda said after signing the accord at a state-owned convention centre in Kathmandu.
"Nepal, despite being a small and poor country has shown how it can provide a new message to the world by solving the conflict through dialogue," said the guerrilla chief, who emerged from years of hiding in June.
"We are not dogmatic communists and we are prepared to change and debate our beliefs with anybody," he said.
Koirala echoed those views and urged Nepal's historically divided political parties and the rebels to sink their differences and join forces to develop the Himalayan country.
"From today, the politics of killings, violence and terror is over and we all have now started the politics of reconciliation," said the 85-year-old prime minister, dressed in a traditional Nepali jacket and cap.
As they talked the two leaders were frequently cheered by hundreds of supporters, including Maoists, packed in the balcony of the hall along with diplomats, businessmen, politicians and the media. The event was also telecast live across the country.
Earlier this month, the ruling seven-party alliance and the Maoists struck a deal under which the guerrillas agreed to restrict their fighters to 28 camps and store their weapons in UN-supervised containers.
In return, the state army will remain in barracks and an equal number of its arms will be locked up in the run-up to the assembly election meant to be held by June 2007.
The United States, the UN, Britain, which has historic ties with Nepal and the country's neighbour India welcomed the signing of Tuesday's accord and promised support.
But London, New Delhi and Washington warned both sides peace would depend on them honouring commitments. Political analyst C. K. Lal said the deal would only stick if the Maoist fighters, who have already started arriving in temporary camps in the countryside, were satisfied the monarchy would be abolished.
"Otherwise, they can revolt anytime."