The candidate with the biggest number of votes was Ram Baran Yadav, a member of the ruling Nepali Congress party, who won 283 votes.
  
Ramraja Prasad Singh, 73, the candidate backed by the Maoists though not a member of the party, was favourite to win but received only 270 votes.
  
A candidate fielded by Nepal's third main party won no votes, leaving Yadav and Singh to compete on Monday.

Yadav said: "I am confident I will win the election today. Apart from the three parties in our new alliance I have been pledged support by a few other smaller parties today."

Al Jazeera's Subina Shrestha, reporting from Kathmandu, the capital, on Monday, said that Yadav is now the likely winner.

She said: "We don't know how the proceedings will go because, last time, everyone had expected the Maoist nominee to win but it didn't happen."

"The election of a president is significant because it means that the government can move forward."

Political limbo

The country has been stuck in political limbo since the assembly sacked King Gyanendra and abolished the monarchy in a meeting on May 28.

Girija Prasad Koirala, the interim prime minister, has also resigned, but with no one in power to accept his resignation, he has lingered on as a weak caretaker. One of the president's first jobs will be to swear in a new prime minister.

The three main parties had hoped to select a president by consensus. But infighting led to a falling out and to the assembly's presidential election.
     
Both candidates are ethnic Madhesis who come from the troubled lowland area bordering India known as the Terai, where demands for an autonomous federal state have seen frequent deadly clashes.