The post of the prime minister fell vacant on May 25 when Maoist leader Pushpa Kamal Dahal 'Prachanda' resigned under a power-sharing deal with Deuba, the Nepali Congress leader.
Deuba, 70, was the sole candidate to contest the prime ministerial election as the main opposition UML or any other party didn't register their candidacies.
"Called Shri Sher Bahadur Deuba to congratulate him on being elected the Prime Minister of Nepal," Modi tweeted.
"I conveyed my best wishes to Shri Deuba for peace, prosperity and progress in Nepal under his leadership," he said in another tweet.
Deuba became the 40th Prime Minister of Nepal.
Disclaimer: No Business Standard Journalist was involved in creation of this content