Kathmandu: Politicians in Nepal struck a last-minute agreement on Sunday to extend the Constituent Assembly's term so that it may complete its long-due task of drafting a new constitution, averting a political crisis in the Himalayan nation.

The breakthrough came after overnight consultations between main political parties -- Nepali Congress, the Maoists and CPN-UML -- to forge a five-point agreement on the peace process and extend the term of CA which expired in Sunday night.

Out of 508 parliament members, 504 lawmakers voted in favour of the bill for 9th amendment of the Constitution seeking to extend the term of the CA for three months.

Khanal, who assumed the office about four months ago, offered to resign to pave way for formation of a national unity government and to start regrouping the Maoist combatants for the purpose of integration under the deal.

"The bill was endorsed by more than required two third majority vote," announced chairman of the Constituent Assembly Subhash Nemwang. However, the 71 lawmakers of Democratic Madhesi Front boycotted the voting saying that the major parties failed to address their three-point demands.

The agreement was reached in the wee hours after a marathon meeting between ruling CPN-UML leader and former Prime Minister Madhav Kumar Nepal, Maoist chief Prachanda and Nepali Congress president Sushil Koirala.