PM Sushil Koirala (3R),Unified Marxist Leninist chairman K P Oli (4R), Unified Communist Party of Nepal chairman Pushpa Kamal Dahal (4L) and other lawmakers wave as parliament passes a new national constitution in Kathmandu on September 16, 2015
Nepal's parliament passed a new national constitution on Wednesday, weeks after political leaders reached a historic agreement to create a federal state following an earthquake that killed nearly 9,000 people.
A loud cheer went up in the House as Speaker Subash Nembang announced that the long-delayed bill had been passed after violent protests that have killed more than 40 people and shut down large swathes of the south.
In all, 507 of the young republic's 598 lawmakers came out in favour of the bill in the marathon vote, which began on Sunday and continued late into Wednesday night.
The new charter will replace an interim constitution in place since the end of a decade-long civil war that led to the abolition of the Hindu monarchy, and is due to come into force on Sunday evening after a ceremony at the Constituent Assembly, or parliament.
It will divide the Himalayan nation of 28 million people into seven federal provinces, a move aimed at devolving power from the centre, but which critics say will not do enough to empower historically marginalised groups.
They include the Madhesi and Tharu ethnic minorities, who mainly inhabit the country's southern plains and who claim that the new internal borders will leave them underrepresented in the national parliament.
Political leaders counter that no deal would have pleased all groups, and point to the urgency of ending the long stand-off over the constitution so that the country can start rebuilding after a devastating earthquake in April.
"It is an issue of pride for all Nepalis that the people's constitution has been passed from the Constituent Assembly," tweeted Prime Minister Sushil Koirala.
Koirala has already said he will step down as prime minister once the new constitution is in place, and a new government is expected to be formed.
- Deadly quake -
Work on a new constitution began in 2008, two years after the end of a civil war between state forces and Maoist guerrillas seeking to depose an autocratic king and end high levels of social inequality.
For years the parties were unable to agree on the terms of the new charter, but Nepal's three biggest political forces -- the Nepali Congress, UML and Maoist parties -- ended the deadlock in June after a 7.8-magnitude quake that killed nearly 8,900 people and destroyed around half a million homes.
They reached a deal on a new federal structure for the country, but were criticised for leaving the crucial issue of internal borders undecided.
Last month the parties decided to demarcate the provinces in the constitution after warnings that leaving the borders undefined would store up future problems.
But the move unleashed a wave of violence that has killed more than 40 people, among them two young children and a police officer lynched as he was driven to hospital in an ambulance.
On Tuesday -- as Nepal's lawmakers voted through each of the constitution's more than 300 clauses -- police fired into a crowd of demonstrators who had attacked police vehicles in the southern district of Rupandehi, killing four people.
"This is a historic event for Nepal but if the leaders had been a little flexible, the Madhesi, Tharu and Janajati parties that have stayed out of the process could be included," said Lok Raj Baral, executive chairman of the Nepal Centre for Contemporary Studies. Janajatis are minority ethnic groups indigenous to Nepal.
"Ownership of the document is important. Even if it is a minority that does not accept it, the parties have to take an initiative to address the disgruntled elements," he told AFP.
A clause that will make it more difficult for women to pass their citizenship onto their children has also attracted fierce criticism, with rights activists calling it a backwards step.
Police stepped up security around the parliament ahead of the voting, which has also sparked protests in Kathmandu.
The process of drafting the constitution began after the Maoists ended their insurgency and turned to politics, winning a 2008 general election and forming a government.
But they were unable to muster enough support from rival parties to push a new constitution through parliament and the assembly finally collapsed in May 2012 after missing a series of deadlines to pass the bill.
Fresh elections in November 2013 were won by Koirala's left-leaning Nepali Congress, with the Maoists emerging as only the third largest party.
That left them with a reduced mandate to influence the terms of the new constitution, seen as the final stage in the peace process that began after they laid down their arms in 2006.