Yadav is the first head of state since the dissolution of the 240-year-old Hindu monarchy in May.

The Maoists won the most seats in the April parliamentary elections but not enough for an outright majority.

The presidential result showed other parties voting against the Maoists, casting doubts as to whether the Maoists will form a government with Prachanda, their leader, as prime minister.

No decision

Krishna Bahadur Mahara, the Maoist's spokesman, said that no decision had yet been made over the party's next move.

Some analysts believe a split within the Maoists over whether to form a government was now likely.

Kunda Dixit, the editor of the Nepali Times, said: "The Maoists thought they had a mandate to have both the presidency and the premiership. The other parties thought that was concentrating too much power with the Maoists.

"I expect that within a week or so the Maoists will start to form a government. They will be under heavy pressure from both the voters and the international community to do so."

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

Girija Prasad Koirala, the interim prime minister, later 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.