Members of the Cook Islands' ruling party have voted to keep their leader.
Doctor Terepai Maoate only just managed to stave off a challenge from his successor as prime minister, Doctor Robert Woonton.
The ballot was split 26-24 in favour of Doctor Maoate.
It means that the Democrats, although being the ruling party, are led by a backbench MP.
Doctor Maoate said, after being re-elected, that Doctor Woonton could stay on as Prime Minister if he wanted to, as he'd been appointed by parliament and chosen by the party caucus.