The former Cook Islands Prime Minister, Henry Puna is the new Secretary General of the Pacific Islands Forum after a marathon online meeting.
Puna was voted in over Micronesia's candidate Marshall Islands Ambassador to the US, Gerald Zackios by nine to eight.
The outgoing secretary-general, Papua New Guinea's Dame Meg-Taylor had been in the role for over six years.
Regional divisions over who should replace her emerged last year.
Micronesian states threatened to leave the Forum if the role wasn't given to their candidate, saying that it was Micronesia's turn, citing a pledge to rotate the post by sub-region.
But Polynesian and Melanesian countries backed their own candidates.
The appointment has already drawn expressions of frustration from Micronesia, with Palau's president Surangel Whipps Junior describing the Forum as an organisation in which the South Pacific countries side with the bigger countries (Australia and New Zealand) to dominate decision-making.
"Clearly there is no need really for Micronesians to be part of them (PIF), they don't really consider us part of them," Whipps Jr lamented.
He said other Forum members didn't want to honour the pledge, denying that they knew anything about it.
Other contenders were Tongan economist Amelia Kinahoi Siamomua, Fiji's former foreign minister Ratu Inoke Kubuabola, and Jimmie Rodgers of Solomon Islands, formerly the director general of the Pacific Community.
With leaders unable to reach consensus in last night's Special Leaders Retreat, the appointment process went to a vote. It resulted in three eliminations and a final vote after midnight.
In a press conference today, the chair of the Pacific Islands Forum downplayed differences in the membership over the appointment
Kausea Natano, who is also Tuvalu prime minister, said everything has been resolved, the region's leaders remain united despite their differences.
"All the leaders were very strong in their support for the new secretary-general," Natano said, adding that there was no discussion about Micronesian members leaving gther Forum.
"Some of the presidents of the Micronesian groups were in the final part of the meeting and they were very strong in their support for the solidarity of the region."
New Zealand's prime minister Jacinda Ardern was one of the only national leaders of the 18 Forum members states or territories not to attend the online meeting. The country's foreign minister Nanaia Mahuta logged on instead.
In a statement, Forum leaders commended Dame Meg's "stellar leadership and guidance to the Pacific Islands Forum on regional issues over the past 6 years and wished her well in her future endeavours".
Also on the agenda of the Special Leaders Retreat, conducted via video-conferencing, was the Covid-19 pandemic, including the distribution of vaccines to the region.
Leaders acknowledged the region's efforts to date to manage the spread of the Covid-19 pandemic in the Pacific region, including through the establishment and operationalisation of the Pacific Humanitarian Pathway on Covid-19.