Nepal has adopted a new constitution that aims to bolster its transformation to a peaceful democracy after decades of political instability and a long civil war, even as protests rage over its terms.
The charter, the first to be drawn up by elected representatives, was voted into law on Wednesday (local time) after the main political parties - spurred by a deadly earthquake to shelve differences - agreed on a new federal structure.
Firecrackers went off in celebration in Kathmandu as President Ram Baran Yadav announced the adoption of the long-delayed constitution at a ceremony in parliament.
"I congratulate all Nepali brothers and sisters on this historic moment, the announcement of Nepal's constitution from the Constituent Assembly by the representatives of the people for democratic rights, economic prosperity and national unity," he said.
"The democratic revolution of Nepal's people which began nearly seven decades ago and the people's wish for long-term peace has become a reality today."
The new constitution is the final stage in a peace process that began when Maoist fighters laid down their arms in 2006 after a decade-long insurgency aimed at abolishing an autocratic monarchy and creating a more equal society.
But its adoption follows weeks of clashes between police and protesters that have left more than 40 people dead, among them two children and a police officer lynched as he was driven to hospital in an ambulance.
One protester was killed on Sunday when police fired into a crowd which had defied a curfew in the southern district of Parsa to demonstrate against plans to divide the world's youngest republic into seven federal provinces.
The move to create a new federal structure that will devolve power from the centre has widespread support, but critics say the planned internal borders will leave some historically marginalised groups under-represented in parliament.
They include the Madhesi and Tharu ethnic minorities who mainly inhabit Nepal's southern plains, along the border with India.