KATMANDU, Nepal — Prime Minister Jhalanath Khanal resigned on Sunday, acknowledging that he had failed to advance a stagnant peace process or agree with the opposition on a new constitution, tasks he had promised to accomplish when he was elected to his post by a parliamentary vote in February.

“The prime minister has resigned to pave way for the formation of a consensual coalition government and for the completion of the peace process and constitution writing,” said the prime minister’s press adviser, Surya Thapa.

The prime minister and Nepal’s opposition parties have been deadlocked over how to integrate and rehabilitate more than 19,000 former Maoist rebels, a crucial sticking point that has stalled the formation of a political consensus since the end of a civil war in 2006.

Under the peace deal, an undetermined number of former rebel fighters are supposed to be integrated into Nepal’s security forces. But the other parties want the Maoists to disband the paramilitary structure of their party.