Samoa’s first female prime minister has finally taken office, more than three months after winning an election which sparked a constitutional crisis.

A smiling Fiame Naomi Mata’afa sat in the chair her predecessor had been reluctant to relinquish after 22 years in power.

The 64-year-old then held her first Cabinet meeting, with members of her Fast Party dressed in the distinctive red clothes that party members and supporters often wear, and said they were ready to begin their work.

That could include a reset of the island nation’s relationship with China – on the campaign trail, Ms Fiame had pledged to stop a 100 million US dollar (£72.5 million) port development backed by Beijing, calling the project excessive for a nation that is already heavily in debt to China.

After a knife-edge election result in April, Ms Fiame’s predecessor, Tuilaepa Sailele Malielegaoi, refused to concede defeat, despite several court rulings that went against him.

Tuilaepa Sailele Malielegaoi refused to concede defeat after a knife-edge election result in April (Kevin Hagen/AP)

Mr Tuilaepa had two powerful allies in the nation’s head of state and the Speaker, who were able to stall the transfer of power.

A bizarre scene played out in May when Ms Fiame and her party were locked out of Parliament, with Mr Tuilaepa claiming he was still in charge. Both sides accused each other of trying to stage a coup.

Ms Fiame and her party members took oaths and appointed ministers in a ceremony held under a tent in front of the locked Parliament.

In a recent interview with the Associated Press, Ms Fiame said that day was charged with emotion.

“It could have gone pear-shaped, but we were able to keep calm,” she said. “We could have stormed the building and knocked down the doors, like in Washington DC. But we just sat and sang a few hymns, sang a prayer.”

Last week, the nation’s top court ruled the unusual swearing-in ceremony that day had been constitutional, and Mr Tuilaepa finally conceded.

Ms Fiame had previously served as Mr Tuilaepa’s deputy.

She said in the interview that she resigned after becoming concerned that M