‘Akilisi Pohiva defeated former deputy prime minister Samiu Vaipulu 15 to 11 in a secret ballot in the capital Nuku’alofa.
The vote indicates he got support from outside his Democratic Party, which has just 10 seats in the 26 member House.
A clue to which MPs swung the vote in favour of Pohiva and his party was given in two subsequent votes.
Two more secret ballots chose former Prime Minister Lord Tu’ivakano as the new Speaker of the Tongan Parliament, with Lord Tu’i’afitu – the former Minister of Health – as the Deputy Speaker.
The votes were again 15-11 for those appointments.
A new Tongan government should be in place by the New Year.
The election marks the end of an election cycle that began nearly five weeks ago with Tonga’s second elections under a more democratic system.
Pohiva has long been instrumental in the push to increase democracy in Tonga and reduce the powers of the king.
In a heartfelt thank you speech in parliament Pohiva thanked the people of Tonga for putting their trust on him.
He promised he would continue to do his best to build Tonga.
Local journalist Fatai Fainga’a said Pohiva appeared to be a popular choice.
“I can tell the majority of the public were very excited with the results,” she said.
“The result has been submitted to his majesty King Tupou VI and I do believe he was happy with it, despite that fact that Akilisi has a history of always opposing the royal family.”
Pohiva was first elected in 1987 and is the longest serving MP in the Tongan parliament.
He was jailed in 1996 for contempt of parliament and was charged with sedition in the wake of the 2006 pro-democracy riots in Nuku’alofa.
Pohiva was one of only five people’s representatives to keep their seats at last month’s election, which saw 12 representatives and one noble dumped by voters.
Nine members of Tonga’s 26-seat parliament are chosen solely by the 33 members of the country’s nobility.
The other 17 seats are elected by the people and Pohiva’s Democratic Party of the Friendly Islands controls nine of those seats.
Fainga’a said Pohiva used his first speech to appeal to the nobles to cooperate in further reforms.
“He also called on the noble representatives to parliament for more cooperation in order to move Tonga forward for more democratic government,” she said.
“This is a huge step forward for that democracy – him being prime minister.”
Last year, Pohiva’s party attempted to push more political reforms including direct election of the prime minister and allowing the public to vote for the nine noble seats.
Now the next big task ahead of the newly-elected prime minister is to select a deputy prime minister and 12 members of his cabinet.
November’s election was only the second in which Tongan commoners have been able to elect the majority of MPs.
Prior to the election in 2010, the king held the power to appoint the cabinet.
Former prime minister Fred Sevele, who was also a commoner, was appointed by the king, but Pohiva is the first elected to the role.
A Tongan political scientist says the election of ‘Akilisi Pohiva as prime minister is a great day for democracy in Tonga.
The head of Massey University’s Pasifika centre, Malakai Koloamatangi, says many in Tonga feel it is something that Pohiva, who has fought for democracy for 40 years, has deserved.
“Pohiva’s election as prime minister is good for democracy, it’s good for his supporters obviously and I think most people in Tonga they see this as a day certainly for Pohiva, because he has basically been fighting all his adult life for this day and people feel that he deserves to be given the opportunity.”
Dr Koloamatangi says whether the new government can make a difference in Tonga will depend on who Pohiva brings into cabinet.
Meanwhile the Chair of the Tongan Advisory Council in New Zealand says the new Prime Minister of Tonga will need a lot of luck to succeed.
Melino Maka says there are many challenges ahead for Pohiva, most to do with an ailing economy.
Maka says while he greets the election positively there is a lot of work to be done now.
“On one hand I am happy for him, on the other hand I really feel sorry for him because the country is not in good shape.
“He needs some degree of luck while he is at the helm as Prime Minister and I think what Tonga needs to do now is get behind him and help that process.”
A prominent publisher with links to the Democratic Party, Kalafi Moala, says the election of Pohiva has ushered in a new era for Tonga’s pro-democracy movement.
Moala says the result is a popular one that was greeted by cheers and the tooting of car horns in the capital, Nuku’alofa.
He says it also means the Democratic Party will go into a new phase, having made up the opposition in the past.
“I believe that the party and the movement itself will reorganise and start to handle and try to manage something very new to them and that is to be in government.
“Everything that they have been in opposition to, everything that they have been critical of – they now have a chance in parliament to bring about those changes.”