Australia will work with its allies to ensure China does not set up a military base in the Solomon Islands, Prime Minister Scott Morrison vowed Sunday during a heated pre-election debate.

China's growing clout in the Pacific has become a hot political issue in Australia ahead of May 21 elections, following Beijing's announcement last month that it had signed a security pact with the Solomons.

The China-Solomons deal has not been publicly released but a leaked draft alarmed countries in the region, particularly sections that would allow Chinese naval deployments to the Solomons -- less than 2,000 kilometres (1,200 miles) from Australia.

Morrison, whose conservative government is trailing the opposition in latest opinion polls, has been criticised for failing to prevent China from signing the deal in a region where Australia has traditionally had great influence.

Opposition Labor Party leader Anthony Albanese described it in the televised debate as a "massive foreign policy failure".

The prime minister has warned that establishing a Chinese military base in the Solomons would be crossing a "red line".

Pressed during the debate on what that red line means, Morrison said: "Australia would work with partners to ensure that that type of an outcome would be prevented."

Morrison added, however, that it would be "unwise" to speculate about specific measures that Australia might take to prevent a military base being established on the Solomons.

"The Solomon Islands government themselves have made it very clear to us that that is not an outcome that they are seeking or supporting either. I believe it is not in their national interest to have such a presence," he said.

Scott Morrison (right) debated with Labor Party leader Anthony Albanese (left) ahead of this month's elections
Scott Morrison (right) debated with Labor Party leader Anthony Albanese (left) ahead of this month's elections POOL via AFP / Alex Ellinghausen

Australia's foreign minister Marise Payne held talks with her Solomons counterpart in Brisbane on Friday night during which she repeated Australia's "deep concern" over the agreement and the "lack of transparency" over its content.

But she said the Solomons' foreign minister, Jeremiah Manele, reassured her that Australia remained the Pacific state's "partner of choice".

The Solomons' prime minister, Manasseh Sogavare, has reacted angrily to criticism of the China deal, which has been led by Australia and the United States.

Sogavare said he deplored a lack of trust by "concerned parties", insisting that the deal with China was "nothing to be concerned about".

The island state's leader told parliament Tuesday that there had been "warning of military intervention" if other nations' interests were undermined in the Solomon Islands.

"In other words, Mr Speaker, we are threatened with invasion. And that is serious," the prime minister said.

"We are being treated as kindergarten students walking around with Colt 45s in our hands, and therefore we need to be supervised," he added.

"We are insulted."

Morrison has denied any invasion threat from Australia, insisting his government treats its Pacific allies as equals while urging a "calm and composed" approach to the issue.

The Solomon Islands government severed ties with Taiwan in September 2019 in favour of diplomatic relations with China, a switch that unlocked investment but stoked inter-island rivalries.

Last November, protests against Sogavare's rule flared into riots in the capital Honiara, during which much of the city's Chinatown was torched. Australia led an international peacekeeping mission to help restore calm.