Police officers form lines outside a meeting of Nepal's new constitutent assembly which voted Wednesday to end the country's 239 year old monarchy. (Saurabh Das/ASSOCIATED PRESS)

Lawmakers in Nepal voted overwhelmingly Wednesday to abolish the country's 239-year-old monarchy, turning the world's only Hindu kingdom into its newest republic.

Members of the country's newly elected constituent assembly cast their votes inside a converted convention centre in the ancient Nepalese capital, Kathmandu, as thousands of people celebrated in the streets outside.

The decision came much later in the day than scheduled because of last-minute procedural wrangling by political leaders. When word of the vote reached the crowds, people cheered and chanted "Long live republic." The government declared a two-day national holiday.

At one point in the evening, as assembly members filed into the building, there were two small bomb explosions blamed by police on militant monarchy supporters. Several people were injured.

Supporters of the assembly's largest political party, a former Maoist rebel group, waved red flags with the communist hammer and sickle symbol. 

Banners and signs welcomed the new republic and denounced the outgoing king,  Gyanendra Bikram Shah, whose family has ruled Nepal since 1769.

Gyanendra assumed the throne in 2001 when most of his close family were massacred at a family dinner by the heir to the throne at the time, prince Dipendra. An official inquiry said Dipendra had been drunk, high on drugs and furious at his parents, the king and queen, for refusing to allow him to marry the woman of his choice.

Royal coup in 2005

Despite his status as just a constitutional monarch, Gyanendra dismissed an elected government in 2002 and took direct power himself three years later in an attempt to put down the Maoist rebellion, which claimed some 13,000 lives in 10 years of fighting.

But the king was forced to hand back power in April 2006, jump-starting a peace process that saw the rebels become a legal political party, elections to the new assembly earlier this year and Wednesday's abolition of the monarchy.

Gyanendra has given no indication how he intended to respond to the end of the monarchy, and the country's leading politicians have in recent days threatened to remove him from the 1970s-era concrete palace by force if he refuses to go peacefully.

But in an apparent bid to defuse any potential standoff, the country's newly elected assembly will give the outgoing king 15 days to vacate his palace, political leaders said.

There was no immediate reaction from the palace, which has rarely commented on political developments in Nepal since Gyanendra was forced to end his royal dictatorship and restore democracy two years ago.

It's reported in the Nepali media that he will now become an ordinary citizen of Nepal and despite losing his seven palaces and multimillion-dollar annual allowance, is still one of the country's richest men.

But getting rid of the Shah dynasty is in many ways the least of the new government's problems.

Nepal is still plagued by political unrest and frequent outbreaks of violence. There were at least seven bomb attacks in the days before the assembly made its historic decision.

Analysts said the new assembly will be hard pressed to put years of conflict behind the major parties and take concrete steps for economic and political development.

Despite being close to Asia's two largest and fastest-growing countries, India and China, Nepal is one of the world's poorest nations, with most of its 29 million people living on less than a dollar a day.

It has few known natural resources and even its abundant hydro power potential from the Himalayan mountain rivers that criss-cross the landscape has yet to be widely exploited. 

with files from the Associated Press