Australia has apologized to Solomon Islands Prime Minister Gordon Darcy Lilo after a lapse in protocol saw him swabbed for explosives at Brisbane airport.

Mr Lilo was stopped on Saturday at a security checkpoint and asked to submit to the random test.

Solomon Islands media reports a stand-off ensued when Mr Lilo refused.

Security screening has proved a testing issue for Australia's relations with smaller Pacific neighbours since former Papua New Guinea prime minister Sir Michael Somare objected to removing his shoes for an X-ray check.

A Foreign Affairs spokeswoman said the department regretted any embarrassment or inconvenience caused to Mr Lilo.

"He should have been exempt from the random explosive trace detection test," the spokeswoman said.

"The department is working with relevant Australian government agencies to understand what happened and ensure that breaches of dignity do not occur again."

Mr Lilo recently said he had been approached informally by Australian diplomats to see if Solomon Islands would take part in Labor's Pacific policy for resettling refugees, but had refused.