It has been just two weeks since Papua New Guinean politics erupted. The dramatic events saw politicians in our nearest neighbouring country camping out in two hotels, shouting matches in parliament, and threats of no-confidence motions, before eventually, realising he had lost the support of his colleagues, the prime minister Peter O’Neill resigned.

The subsequent transition has been smooth. The new prime minister James Marape has succeeded O’Neill and his newly-appointed cabinet has begun work.

As the dust settles on the recent regime, what are we to make of Peter O’Neill’s eight years as PM? And what lessons there are for his successor, James Marape?

For Australians, O’Neill’s reign was most notable for his 2013 Manus agreement signed with Kevin Rudd. And that is a significant and controversial part of the O’Neill legacy. But we must not make the mistake of looking at O’Neill through an Australian lens. There was far more to O’Neill’s reign than Manus.

In terms of achievements, surviving for eight years as prime minister was one of them. The resulting political stability facilitated the initiation of some large projects, the rehabilitation of the country’s most important highway chief among them. O’Neill also succeeded where others had failed in getting rid of school fees, thereby getting a lot more kids into school. And he pulled off the hosting of APEC in 2018, which probably leveraged more foreign aid for the country.

On the other side of the ledger, O’Neill borrowed heavily during the early years of his reign. Unfortunately, these years turned out to be the last years of the country’s economic boom, and the debt accrued made the subsequent downturn harder to manage.

More fundamentally, for a long time O’Neill played down the impact of the collapse in oil prices in late 2014 on the state of the economy. He could have – should have – used this external shock as the legitimate pretext for a number of tough economic decisions. But he didn’t, and ended being trapped by his own spin, endlessly talking up the economy, basically waiting for things to improve, while in fact they got worse with living standards falling, employment contracting, and government services weakening.

Politically, while O’Neill was a strong leader, he antagonised too many of his colleagues via a series of controversial captain’s calls. The 2014 UBS loan to purchase Oil Search shares cost him valuable allies, as did – much more recently – his finalisation, against bureaucratic advice, of the Papua LNG gas agreement. It is sometimes said that all power rests with the PM in PNG politics, but O’Neill’s eventual demise illustrates the dangers of concentrating rather than sharing power. His successor Marape acknowledged this when he resigned as one of O’Neill’s ministers in April – one of the events that precipitated O’Neill’s fall – saying that PNG was not a nation “to be dominated by one person”.

O’Neill also struggled with many of the dilemmas that ruling PNG involves. For example, on corruption, O’Neill came in promising a crack-down, establishing Taskforce Sweep to fight corruption within two weeks of becoming PM, in August 2011. But less than three years later the taskforce was disbanded after it went after O’Neill himself on corruption charges. The PM promised to replace Taskforce Sweep by an Independent Anti-Corruption Commission, but never did. While it is difficult to quantify corruption, the consensus is that it increased and institutions weakened under O’Neill’s reign.

O’Neill, by virtue of his longevity and energy, was probably PNG’s most powerful prime minister, but he was also perhaps the most divisive. A skilful politician, he appeared invincible for so long, but he finished his time as PM isolated and defeated by what even he admitted was a perceived “need for change”, his achievements insufficient to counter his mistakes and vacillations.

What are the lessons for the new prime minister? James Marape, finance minister under O’Neill, has got off to a good start. He has admitted what O’Neill never could: that the economy is “bleeding and struggling”. Like O’Neill early on, he has taken a strong stand against corruption, and promised action against it. And he has impressed with his Cabinet, appointing one of PNG’s foremost anti-corruption campaigners, MP Bryan Kramer, as police minister, and bringing back one of the UBS-loan ministerial casualties, Kerenga Kua, as petroleum minister.

If Marape can keep his allies close, and not only build but maintain a reputation as a campaigner against corruption, he may have a chance to promote both good policy and political stability. For the sake of our nearest neighbour, one certainly hopes so.

• Stephen Howes is a professor of economics and the director of the Development Policy Centre at the Australian National University