In Nepal, a veteran communist leader, Madhav Kumar Nepal, has been elected as the country's new prime minister, ending a political deadlock which followed the resignation of Maoist Prime Minister Prachanda. But the tiny Himalayan country's political problems are far from over.

The speaker of parliament Subhash Nemwang declared Madhav Kumar Nepal elected to the post of prime minister unopposed on Saturday evening.

Fifty-six-year-old Mr. Nepal heads one of the country's oldest parties known as the Communist Party of Nepal - United Marxist Leninist. He will lead an alliance of 22 parties. 

The alliance was put together after the exit of Maoist Prime Minister Pushpa Kamal Dahal, popularly known as Prachanda. Prachanda resigned earlier this month after the president overturned his party's decision to sack the army chief, who had refused to integrate former rebel fighters into the army.     

Since then the country has been in political limbo, as the Maoists demanded that the president quit, disrupted parliament, and blocked the formation of a new government. 

The Maoists agreed to lift their protests earlier this week allowing a vote to be held on Saturday.

However, Maoists stormed out of parliament before the vote, calling the selection of a new leader a "farce." 

Their absence highlights the many challenges the new prime minister faces. He has to oversee the drafting of a new constitution for the country, scheduled to be completed by next year.

But the job will be difficult without the cooperation of the Maoists who are the single largest party, and control 40 percent of the seats in parliament.

Lok Raj Baral at Kathmandu's Center for Contemporary Studies says that the former rebels have vowed to continue their campaign for the removal of the president.

"They have sizable strength. For creating disturbances, for creating another deadlock, series of deadlocks that will [continue to] be there," he said.

The exit of the Maoists from the government has dealt a severe blow to a peace process which began in 2006 when the former rebels laid down arms, and joined the political mainstream. 

The new prime minister was elected hours after an explosion ripped through a Roman Catholic church on the outskirts of the capital, Kathmandu, where hundreds of people had gathered for a service. A woman and a teenage girl were killed and more than a dozen were wounded.

There was no claim of responsibility but a little-known Hindu extremist group, the Nepal Defense Army, threw pamphlets around the site demanding Nepal be declared a Hindu state. Nepal became a secular state three years ago after the end of the country's decade-long civil war.