SYDNEY, Australia — Prime Minister Peter O’Neill of Papua New Guinea resigned on Sunday, as a flood of high-level defections from his governing party led him to step down after almost eight years in power.
Mr. O’Neill told reporters in Port Moresby, the capital, that there was a clear “need for change.”
He said he had handed over leadership of the Pacific nation to Julius Chan, who has served as prime minister twice before, though the opposition party said it would soon form its own government, suggesting the next few days could be defined by uncertainty and shifting alliances.
“By resigning, Mr. O’Neill clears the field for members of his still significant support base to also contest for leadership this week,” said Jonathan Pryke, director of the Pacific Islands program at the Lowy Institute in Australia.
Political instability in the resource-rich and strategically placed country is nothing new; it has often shaken Papua New Guinea since it gained independence in 1975. But Mr. O’Neill’s departure comes at a sensitive moment, with China and the West fighting for influence across the Pacific.
Mr. O’Neill has been an important figure in that new Cold War, frequently playing one side off the other while trying to manage a struggling economy.
He has denied that China is seeking more sway over his country, even as investment has grown year over year. Most recently, he has been a vocal supporter of a major development in Port Moresby, led by Chinese investors, that would include apartments, shops, a movie theater and a hotel.
At the same time, he has sought to maintain close ties to Australia, which provides more aid money to Papua New Guinea than any other country.
Last year, after he mentioned the possibility of letting China finance port development, Australia persuaded Mr. O’Neill’s government to jointly upgrade Papua New Guinea’s Lombrum Naval Base on Manus Island, which had previously been used to house asylum seekers trying to reach Australia by boat.
Vice President Mike Pence then announced at a regional meeting in Port Moresby of the Asia-Pacific Economic Cooperation forum, known as APEC, that the United States would also lend support for the base.
“We will work with these nations to protect the sovereignty and maritime routes of Pacific island nations,” Mr. Pence said.
It is unclear how Mr. Chan — or another new government — would handle these agreements, or the relationships with Australia, China and the United States.
“We won’t know that until we see the makeup of the new government,” Mr. Pryke said. “Some are more influenced by China than others. But it will definitely be an immediate challenge for whoever takes over.”
One challenge the country faces concerns national sovereignty. An independence referendum is being held in October in the autonomous region of Bougainville, as part of a 1998 peace agreement ending a nine-year civil war with the Papua New Guinea mainland.
Mr. O’Neill’s departure comes after months of growing discontent. He has repeatedly come under fire for failing to jump-start the economy or stamp out corruption. A polio outbreak — the result of a health care breakdown — arrived just as the country bought expensive cars to host the APEC summit meeting late last year.
Even as the strength of the opposition grew over the past few weeks, and questions swirled about whether Mr. O’Neill had Australian citizenship — which would bar him from Parliament — he refused to depart.
But on Friday, at least nine members switched to the opposition, including a crucial coalition ally, making his resignation all but inevitable.