Papua New Guinea's veteran prime minister formally resigned on Wednesday, easing a months-long political crisis and calling a multi-billion-dollar French and US-backed gas deal into doubt.
Facing a vote of no confidence he looked sure to lose, Peter O'Neill told parliament that he had tendered his letter of resignation to the country's governor general.
O'Neill had led the rugged and ethnically diverse nation for eight years but had been criticised for endemic corruption and chronic underdevelopment.
Powerful regional politicians had baulked at his recent $13 billion deal with Total and ExxonMobil to extract, pipe and ship liquefied natural gas (LNG) overseas.
Finance minister James Marape was the first senior cabinet official to resign in protest, saying the money would not go to ordinary Papua New Guineans, local firms or the regions.
A similar deal in the last decade has failed to bring wealth to a country where around 70 percent of people do not have access to reliable electricity.
O'Neill had earlier promised to resign, but failed to do so and took court action in a bid to cling to power.
That prompted angry scenes in parliament Tuesday, including physical confrontations between O'Niell's supporters and opponents trying to oust him and the speaker of parliament.
But on Wednesday O'Neill jumped: "I want to inform this honourable house that at 9:45 am this morning I delivered to... the governor-general of Papua New Guinea my letter of resignation so that we can deal with this matter once and for all."
In a valedictory speech, O'Neill touted his achievements in office, including hosting the 2018 APEC summit, a vast undertaking for a developing country with limited central government capacity.
"We have always been known for the wrong reasons," O'Neill said.
A parliamentary vote on a new prime minister is expected to take place in the coming days.
Experts said that his departure could see an end to big-ticket infrastructure projects that many believe have benefited only Port Moresby and the country's connected elite.
"O'Neill's departure has the potential for a wholesale shift in the policy direction taken by PNG's government," said Jonathan Ritchie of Melbourne's Deakin University.
"But the suspicion of at least some informed Papua New Guinean observers is that it will result only in the rearranging of the deck chairs," he wrote ahead of O'Neill's departure.
"A reshuffling of the cards that will lead to another privileged insider, another member of PNG's political class, taking over the PM's role from the mostly unlamented O'Neill."
Papua New Guinea in crisis as PM stalls resignation
Papua New Guinea Prime Minister Peter O'Neill stalled his announced resignation and took legal action to prevent a vote of no confidence Tuesday, deepening the country's political crisis.
The veteran leader launched what appeared to be a last-gasp bid to cling on to power, pressing the Supreme Court to thwart a planned parliamentary vote to remove him from office.
Facing mounting criticism, O'Neill on Sunday announced that he would step down, but has so far avoided formally submitting his resignation to the country's governor general.
O'Neill - who has been in power since 2011 - is battling for his political life after a string of cabinet resignations sparked by his signing a multi-billion-dollar liquefied natural gas (LNG) deal with France's Total and US firm ExxonMobil earlier this year.
Local communities had complained bitterly about not benefiting from similar deals in the past.
O'Neill's government narrowly avoided a vote of no confidence after the signing by adjourning parliament for almost a month.
On the eve of lawmakers' return and with a new confidence vote planned for June 6, O'Neill lodged an appeal with the Supreme Court.
In a lengthy filing, O'Neill said he wanted to "ensure clarity of constitutional and legal processes".
The court on Tuesday refused to hear the case urgently and set proceedings for Friday, according to opposition lawmaker Brian Kramer.
O'Neill's opponents believe they have the votes to oust him.
On Tuesday, they elected member of parliament and National Alliance Party leader Patrick Pruaitch as their alternative prime minister.