KATHMANDU (Reuters) - Sher Bahadur Deuba, the head of the centrist Nepali Congress party, won election as the Himalayan nation’s new prime minister on Tuesday, days after his Maoist predecessor quit under a power sharing deal.

Slideshow ( 4 images )

Deuba has previously served three times as prime minister, in 1995-1997, 2001-2002 and 2004-2005. Nepal’s last monarch King Gyanendra called him incompetent and fired him in 2002 for failing to contain a Maoist insurgency and hold elections.

He was later reinstated only to be sacked again in 2005, triggering political unrest that toppled the 239-year-old monarchy three years later.

Parliament Speaker Onsari Gharti said the 70-year-old Deuba won 388 votes of the 558 cast in the 593-member parliament to head the country’s 10th government in as many years.

Deuba’s immediate task is to complete the two-phase local elections on June 28, a precondition for holding a national election by the end of the year. The first phase of local polls, in which less than half the country voted, was in mid-May.

“I am committed to hold the second phase of local elections ... as well as state and parliamentary polls in a free and impartial manner on schedule,” Deuba, dressed in skin-tight trousers, a knee-long Nepali robe and black cap, said in an address to parliament before being elected.

Deuba was supported by the Maoist Centre party of his former foe and predecessor Prachanda, and other smaller groups. The two leaders have struck an unlikely power-sharing deal which is expected to hold until the national elections.

The deal, made last year when Prachanda - who goes by one name - was elected prime minister, was designed to organize elections to local bodies that have not been held since 1997 due to conflict and political instability.

After all three elections, Nepal hopes a new republican constitution prepared in 2015 but rejected by some ethnic groups as discriminatory will come into full operation.

Political changes in Nepal, rich in potential hydroelectric power and home to Mount Everest, are closely watched by neighbors China and India as they jostle for influence.

Kunda Dixit, editor of the weekly Nepali Times, said Deuba’s track record did not inspire a great deal of confidence.

“He comes with a lot of baggage,” Dixit told Reuters. “Every time he was appointed or sacked as prime minister, he has left democracy in a crisis.”