Updated

Prime Minister Baburam Bhattarai will resign by the end of the month as part of an agreement Nepal's major political parties reached overnight to create a new coalition government, an aide said Friday.

Bhattarai's Cabinet resigned Thursday night to make way for the new government, his press adviser Ram Rijan Yadav said.

Bhattarai will form the new government, including members of all major parties in Nepal, by the weekend to help draft a new constitution by a May 27 deadline.

"Once the constitution process is complete, the prime minister will step down and hand over power," Yadav said. The new government would then hold elections within one year.

A new constitution is a key part of the peace process that began in 2006 after Maoist rebels gave up their armed revolt.

Bhim Rawal of the Communist Party of Nepal (United Marxist Leninist), who took part in the negotiations, said the focus would be to complete the first draft of the new constitution by the deadline.

The agreement and formation of a consensus government is expected to help ease political confusion in the Himalayan nation.

Nepal's Constituent Assembly was elected in 2008 and given two years to create a new constitution. Its tenure has been repeatedly extended, but the Supreme Court has ruled that no more extensions are possible.

Bhattarai, deputy leader of the Communist Party of Nepal (Maoist), had formed the government last year with the support of smaller parties in the assembly.

It is still unclear whether the new coalition government will be able to finalize the constitution by the deadline. The main sticking points include the number of federal states that Nepal would have and who would be the country's chief executive.

The debate has at times become violent. In the southern town of Janakpur, a bomb killed four people Monday at a rally where protesters were demanding a separate state.