UCPN-Maoist chief Prachanda finally got elected from Siraha 5 constituency in southern Nepal by a thin margin.
Prachanda secured 15,244 votes, just 900 votes more than his nearest rival Lila Shrestha of CPN-UML.
Maoist supremo Prahanda earlier had humiliating defeat in Kathmandu 5 constituency in the hand of Nepali Congress candidate Rajan K C who reduced him to the third position.
More From This Section
Nepali Congress has topped the constituent assembly polls by securing 87 seats where as CPN-UML bagged 79 seats.
The remaining 15 seats have gone to other parties.
So far results have declared from 205 constituencies.
Meanwhile, Upendra Yadav, president of Madhesi Peoples Rights Forum (Nepal) has won the election from Sunsari 5 constituency.
Earlier, Yadav had lost election from Morang 5 constituency to Nepali Congress.
However, prominent Madhesi leader Mahanta Thakur, who is the president of Terai Madhes Democratic Party (TMDP) lost the election to Nepali Congress in Sarlahi 6 constituency.
General Secretary of TMDP Hridayesh Tripathi has also lost the election in Nawalparasi 6 constituency.
Another prominent Madhesi leader Vijaya Gachhadar has also lost election from Morang 7 to Nepali Congress.
The counting will lead to the formation of a Constituent Assembly, including 240 elected under a direct voting system. Proportionate voting will elect members to 335 seats and the remaining 26 members will be nominated by the government.
Nepal's Maoists are threatening to boycott the newly-elected Constituent Assembly, alleging conspiracy.
The vote was only the second one since a civil war launched by Maoist rebels ended in 2006. Nepal was then transformed into a secular republic.