Yadav, a relatively unknown figure outside Nepal, was a last-minute choice of the major parties to oppose the Maoist candidate and Madhesi leader Ramraja Prasad Singh.
In the run-off polls, the veteran leader trounced Singh by 26 votes, securing the support of 308 lawmakers compared to 282 for the Maoist nominee who was the favourite till Sunday. The run-off was necessitated as Yadav fell 15 short of the magic figure of 298 in the first round held last week.
The 60-year-old has learnt the fine art of politics from Nepali Congress patriarch B P Koirala and Ganesh Man Singh as also Madhesi leader Ramnarayan Mishra.
Also hailing from the Indian-origin Madhesi community, Yadav received his MBBS degree from Kolkata and MD from the Post Graduate Institute of Medical Education and Research, Chandigarh, spending about 11 years studying in India.
After practising medicine for eight years, Yadav joined Nepali Congress after the 1980 referendum held to choose between party-less Panchayat system and multiparty system.
Yadav, a three-time MP from Dhanusha, entered parliament as a Nepali Congress candidate for the first time in 1991. He was re-elected in 1999 and elected to the Constituent Assembly in the landmark polls on April 10 this year which saw the Maoists emerging as the single largest party.
A farmer's son who made a remarkable journey to occupy the highest post in the new-born republic that abolished the 240-year-old monarchy, Yadav said he wants to take the peace process to its logical end and maintain friendly ties with both India and China.
"I am committed to taking the peace process to its logical end and to end the politics of violence and terror for ever," Yadav told PTI.
"It is not enough to turn the country into a republic, but it is equally important to consolidate democracy. There is a need to strengthen national unity and safeguard national integrity by bringing communal harmony in the country," Yadav said.
But his agenda could face hurdles from the former rebel Maoists, who won the most number of seats in the Constituent Assembly and were hoping to get both the posts of president and prime minister to guide the destiny of Nepal.
However, after being pipped by the three other major forces -- the Nepali Congress, Communist Party of Nepal-United Marxist Leninsist and the Madhesi People's Rights Forum -- the Maoists who returned to mainstream politics after a decade of guerrilla warfare, are sulking and say they will sit in the opposition.
However, Yadav maintained that he will try to move ahead the politics of collaboration and cooperation to draft a democratic constitution, which is our ultimate goal.
Yadav also said Nepal should maintain a good friendly relations with both its giant neighbours India and China.
"We should keep in mind our national interest and national independence as well as territorial integrity while developing friendly relations with other countries," he said.
Nepal can learn a lot from India, the world's largest democracy, he said. "India has made tremendous progress in the past 60 years after independence and we have to learn many things and also get cooperation for our development."