The Cambodian national assembly has voted to endorse the reappointment of Hun Sen as prime minister.
Hun Sen (R) has formed a coalition with Prince Norodom Ranariddh
The country's new government has also been formally ratified, ending 11 months of political deadlock.
Hun Sen's Cambodian People's Party (CPP) won last year's general election, but without enough seats to rule alone.
After long months of negotiations, the CPP finally struck a deal with the royalist Funcinpec party last month.
Sitting officially for the first time since general elections last summer, 96 members of the 123 seat National Assembly endorsed the country's new government, with Hun Sen at its head for his third elected term.
They also voted for Prince Norodom Ranariddh, the leader of Funcinpec, to stay on as president of the National Assembly - a largely symbolic post.
The session was boycotted by the opposition Sam Rainsy Party, which claimed the voting legislation - which meant the lawmakers' single vote covered several posts - was illegal.
But the leaders of the other two parties, CPP and Funcinpec, presented a united front despite their long-standing differences.
"Our co-operation this time is not only on paper," Hun Sen told reporters. "We will co-operate with each other from the top level to the grass roots."
A power-sharing agreement was finally agreed in June
"Today is a historical day for Cambodia. The political deadlock is over," said a smiling Prince Ranariddh.
The vote came after King Norodom Sihanouk renominated Hun Sen to the post by royal decree on Wednesday.
The widely revered king, who is in self-imposed exile in North Korea after being sidelined throughout the 11-month deadlock, had earlier refused to sign the bill to allow Hun Sen's reappointment.
Analysts said his change of heart could be a sign that he is willing to support the political process again.
For many Cambodians, the end of the political deadlock will be a great relief.
The lengthy political wrangling has prevented Cambodia from taking some important actions, including preparation to join the World Trade Organization and concluding plans for a genocide trial to try former Khmer Rouge leaders.
However, question marks still hang over the country's democratic process, according to our correspondent Tony Cheng.
The burgeoning middle class that had voted for the Sam Rainsy party in significant numbers last year will be disappointed that they are left with almost exactly the same government which called the election.
Sam Rainsy himself is currently out of the country having said that his position within Cambodia is not secure.
Questions also remain over the hasty departure of the acting head of state, Chea Sim, who left the country on Tuesday after suggestions of an internal power struggle within the CPP.
Cambodia's new government looks set to be haunted by many of the political intrigues of its predecessors, our correspondent says.