A top Samoan court on Friday ended a 15-week constitutional crisis, confirming Fiame Naomi Mata'afa as the Pacific island nation's first woman prime minister.
The country has been in a political deadlock since April, when long-ruling Tuilaepa Sa'ilele Malielegaoi narrowly lost in elections and refused to cede power.
In May, Mata'afa was sworn in at an extraordinary ceremony inside a makeshift tent after her FAST party was locked out of the parliament building.
Samoa's Appeal Court said it did not recognise Malielegaoi's caretaker government, ruling that his Human Rights Protection Party (HRPP) was occupying government offices unlawfully.
It also overturned a previous Supreme Court decision that the tent swearing-in was unconstitutional.
"It is now for the new prime minister and her government to give effect to this judgment and the declaration contained within," the Appeal Court said.
"We declare that the swearing in carried out on May 24, 2021 at the Tiafau Malae of elected members of parliament, to be consistent with the terms of the constitution, the supreme law of Samoa, and therefore lawful."
The ruling, which came in response to an appeal by the FAST party, said Samoa now has a lawful government.
"For the avoidance of doubt, this means there has been a lawful government in Samoa since May 24, 2021, and that lawful government is the FAST party which holds the majority of the seats in parliament," the court said.
Samoa's politics have been embroiled in controversy and legal challenges since the election, which ended with Mata'afa's FAST party holding 26 seats -- one more than the HRPP in the 51-seat parliament.
The HRPP had been in power for nearly 40 years with the 76-year-old Malielegaoi, who claimed he was "appointed by God", spending 22 years as prime minister.