Neither advocates nor opponents of a security pact with Beijing won a majority in the Solomon Islands’ parliamentary elections, results announced Wednesday for the last of the legislature’s 50 seats show.

With Australia, the U.S and China looking on, last week’s election was the first since incumbent Prime Minister Manasseh Sogavare switched diplomatic recognition from Taiwan to China in 2019 and struck a security deal with China in 2022, drawing the Pacific Islands nation closer to Beijing.

Forty of the newly elected members of parliament ran as party candidates, and the other 10 ran as independents.

Sogavare’s ruling Ownership, Unity and Responsibility Party (OUR Party) took 15 seats. He will now vie to become prime minister for a fifth time.

The Coalition for Accountability Reform and Empowerment (CARE) — formed by the Solomon Islands Democratic Party, led by Matthew Wale, and the Democratic Alliance Party (DAP), led by former Prime Minister Rick Houenipwela — came in second, winning 13 seats.

Wale said he intended to run for prime minister. He’s a staunch critic of the central government’s wide-ranging security pact with Beijing, had previously accused Sogavare of selling out the country to “foreign interests.”

Another prominent opposition party won seven seats: the Solomon Islands United Party, led by Peter Kenilorea Jr., who had said he would scrap the Chinese security deal if he became prime minister.

Independents and three other small parties hold the remaining 15 seats. They will be lobbied heavily as the major players scramble to assemble at least 26 seats needed to form a government.

The coming days will see much horse-trading — an opaque and unpredictable process that transpires behind closed doors — as all elected members of parliament descend on the capital, Honiara, to select a new prime minister. A new government may take weeks to form.

Members of a particular political party are not legally bound to offer their support and are free to form alliances with other parties and members. This makes it difficult even for experts to predict who will become the next prime minister.

In the 2019 election, the prime minister was chosen around 20 days after election day. If Sogavare is nominated again, he will become the country’s first prime minister to serve two consecutive terms.

Just three women won seats in the parliament this time.

One of them, Cathy Nori, said her victory was “a win for the voiceless and the forgotten,” local media outlet In-depth Solomons reported.