Samoa's first female prime minister, Fiame Naomi Mata'afa, has been legally recognised in a court decision that ended a three-month political impasse.
However, local Samoan media has reported the decision has since been contested by the country's caretaker prime minister, Tuilaepa Sailele Malielegaoi, who served for 22 years.
The political back-and-forth began in early April following the country's elections when Fiame Naomi Mata'afa, leader of the Faatuatua ile Atua Samoa ua Tasi (FAST) Party, won by a slim majority.
Fiame was sworn in in May at an ad-hoc ceremony held in a marquee outside the country's Parliament building after being locked out by the caretaker government.
The caretaker government challenged the swearing-in and argued it was not legitimate because the country's head of state wasn't present.
On Friday, the Samoan Court of Appeal found the swearing-in of FAST MPs on May 24 was legitimate.
Chief Justice Perese, Justice Tuatagaloa, and Justice Tuala Warren delivered their decision on Friday afternoon.
"The practical consequence of the declaration is that the FAST party, having been constitutionally sworn in on May 24, are entitled to take office, " the judgement said.
The Court has moved to head off resistance from the caretaker government of Tuilaepa, of the Human Rights Protection Party (HRPP), signalling it no longer has legal authority.
Despite this, Tuilaepa said he will meet with the caucus on Saturday to discuss moving forward.
The ABC has reached out to Tuilaepa and the HRPP for comment.
A crisis that divided the nation
Samoan lawyer Fiona Ey told the ABC the decision was a "thorough triumph for the rule of law", but it remains to be seen whether it will be abided.
"[Fiame's] role has been very clearly confirmed by the court. But by having the court make that decision and actually seeing the government change, are two separate things," she said.
The formal recognition of Fiame as the country's new Prime Minister by international partners like Australia and New Zealand is crucial for the transfer of power, Ms Ey adds.
"We're now at a point where those international partners should be coming out and firmly validating and recognising Fiame's appointment and bringing this Constitutional crisis to an end," she said.
Samoan journalist Lagipoiva Cherelle Jackson told the ABC that this was the longest story she has ever covered.
"This crisis has challenged that notion … not just the peace, but the clarity that we had as a nation and as a community.
"[It] has certainly created lifelong rifts, broken up families and communities into parties of either HRPP and FAST or Tuilaepa and Fiame."
Despite the challenges ahead, the lawyer for the FAST Party, Muriel Lui, said it was still a historic day for the Pacific nation.
"We now have our first female Prime Minister and she can now get to work," Ms Lui said.
"For a lot of people, it's just relief that we have, that we have an end to the impasse."