Nepal has chosen Madhav Kumar, leader of the Communist Party of Nepal (CPN-UML), as the country's new prime minister after weeks of political turmoil.
Parliament members and supporters cheered and offered Kumar flowers as he left the parliament in Kathmandu, the capital, on Saturday.
Kumar has the backing of 22 political parties and 350 members in the 601-seat parliament, which is more than the simple majority required to be elected.
He has been a prominent figure in Nepalese politics for more than a decade and played an important role during protests in 2005 against the rule of Gyanendra, the last king of Nepal.
Kumar, 56, also played a crucial role during weeks of demonstrations that led to the restoration of democracy after deposing Gyanendra in 2006.
The Maoists boycotted the vote after refusing to accept Kumar's candidacy.
Several Maoist politicians loyal to Nepal's Maoist Communist Party (UCPN-M) stormed out of parliament when the speaker declared that Kumar had been "elected unopposed".
Kumar's predecessor Pushpa Kamal Dahal, the leader of the UCPN-M, resigned on May 4 after the country's president stopped him from firing the army chief.
Though Dahal attempted to block parliamentary proceedings for Saturday's vote, he did put an end to protests several days ago that made Kumar's election possible.
Both Dahal's and Kumar's parties are communist but differ in policies and beliefs.
The Maoists ended their decade-long armed struggle three years ago and entered a peace process.
They won general elections in 2008 but were not able to obtain a majority in parliament.