Nepal's new Prime Minister Sher Bahadur Deuba won the vote of confidence in Parliament on Sunday after receiving support from his own Nepali Congress and the Nepal Communist Party.

Deuba received 165 votes while 84 parliamentarians voted against him. While the lower house currently has 271 members, only 249 lawmakers were present for voting as some boycotted the voting and some were absent.

Deuba was supported by his own Nepali Congress, the Nepal Communist Party (Maoist Centre), the Janata Samajbadi Party, as well as some lawmakers from main opposition Nepal Communist Party-UML whose chair is his predecessor, K.P. Sharma Oli.

Deuba appointed new Nepal PM

The Nepali Congress has 61 seats while coalition partner Communist Party of Nepal (Maoist Centre) has 49 seats. Similarly, the Rastriya Janamorcha, with one seat, also decided to vote for Deuba.

But half of the lawmakers of the Janata Samajbadi Party, which has a total of 32 members, also made a volte face on Sunday and suddenly decided to vote for Deuba. A faction of the party had earlier supported Oli while half of them remained in the opposition.

After the Supreme Court overturned Oli's decision to dissolve the house, the party came together and decided to vote for Deuba. Oli's own party, Nepal Communist Party-UML remained divided. out of its 127 lawmakers, 22 party lawmakers voted in favour of Deuba and 10 lawmakers were absent.

Deuba was appointed Prime Minister of Nepal last Tuesday after the Supreme Court overturned Oli's decision to dissolve the House of Representatives on May 21, and reinstated the house. The Constitution makes it mandatory that a Prime Minister appointed under Article 76(5) secures a vote of confidence within 30 days of appointment.

Modi congratulates Deuba

Indian Prime Minister Narendra Modi congratulated his Nepal counterpart, Sher Bahadur Deuba on Sunday evening, minutes after he secured the vote of confidence in the House of Representatives.

Modi nepal PM
Nepalese Prime Minister Sher Bahadur Deuba shakes hands with his Indian counterpart Narendra Modi (R) during his ceremonial reception at the forecourt of India's Rashtrapati Bhavan presidential palace in New Delhi, India, August 24, 2017.Reuters

"Congratulations Prime Minister @DeubaSherbdr and best wishes for a successful tenure. I look forward to working with you to further enhance our enhance our unique partnership in all sectors, and strengthen our deep-rooted people to people ties," Modi tweeted.