Jacinda Ardern has congratulated Prime Minister-elect Fiame Naomi Mata'afa on her victory in Samoa's general election.
"New Zealand has a special relationship with Samoa, anchored in the Treaty of Friendship. We look forward to working with Samoa's new government in the spirit of partnership that characterises this bond," Ardern said.
"After a long period of uncertainty following the post-election, New Zealand welcomes the stability that a functioning government will bring," Jacinda Ardern said.
Ardern called the win a historic moment for Samoan democracy.
The comments come after Samoa's Court of Appeal ruled the country has a new government.
The court ruled the impromptu swearing-in by the newcomer FAST Party on May 24 was legitimate under the doctrine of necessity.
It has been more than 100 days since the April 9 election.
Party founder and deputy leader La'aulialemalietoa Leuatea Polataivao Schmidt says the party are celebrating with prayers and a church service this evening.
La'auli says they will work through the weekend to ensure a smooth transition of government on Monday.
"Today the court of Samoa has declared the FAST Party the new government. And the doctrine of necessity has now been honoured and the new government starts from the 24th of May since we had that swearing-in."
Fiame Naomi Mata'afa, the daughter of Samoa's first prime minister, becomes the country's first woman in the role.
The Court of Appeal found the May 24 swearing-in satisfies the requirements of the Constitution as a legitimate convening of the Legislative Assembly.
It added that the previous ruling of the Supreme Court, which did not recognise FAST's swearing-in, relied upon the good faith of other actors who are obligated under the Constitution.
The court's findings regret that reliance on that good faith was misplaced.
The ruling concludes with a recognition of "the swearing-in carried out on 24 May 2021 at the Tiafau Male of elected members of parliament, to be consistent with the terms of the Constitution, the Supreme law of Samoa, and therefore lawful".
It continues in its recognition of FAST as government since the ad hoc May swearing-in which casts doubt on any actions as government by the caretaker HRPP since that date.
The judgement was signed by Chief Justice Perese, Justice Tuatagaloa and Justice Tuala-Warren.