Border security officials have come under fire for overseeing a body-scanning trial labelled illegal by Green Party MP Keith Locke.

Customs recently trialled the equipment – which it admits "does reveal anatomical details" – at Auckland International Airport, and it is now working on a plan to implement the scans.

But Locke believes the trial was illegal, citing a provision in the Aviation Crimes Act, and said the government had left itself open to court action.

"The government is breaking the law and that needs to be brought to the public's attention," Locke said.

"I think it is illegal. If they wanted to have a trial, or were thinking about introducing this, they could have easily thought about putting an amendment through because this is contrary to existing law.

"Can you even have a trial involving something illegal? It leaves the government open for people to take a court case. Lawyers could probably have a field day."

But a Customs spokesman said the trial was conducted under a section, and using aids, prescribed under the Customs and Excise Act, which allowed officers to use "x-ray or imaging equipment".

He said Customs took into account human rights and privacy laws, but aside from releasing a series of bullet-points on the trial – which ran from March 14 to April 19 – it would not address Locke's allegations.

Locke said he was aware of the Customs and Excise Act, but said it was written before imaging equipment capable of capturing unclothed images was possible.

He said a section of the Aviation Crimes Act made it clear that Customs officers could not use an aid or device that produced an unclothed image of the person.

Locke, who sat in on the select committee that oversaw the section's implementation in 2007, said: "The act specifically mentions and includes Customs as being prohibited from using an unclothed image. It was the clear will of parliament to prevent any production of an unclothed image ... there was no hint of any exception.

"Customs must know that its power to use imaging equipment must be qualified by the intention of parliament, as expressed in the other act, that the image may not be an `unclothed' one."

At the time of the Aviation Crimes Act's amendment in 2007, then minister for transport safety, Labour's Harry Duynhoven, said, "I introduced supplementary order paper 140 to clarify that body-scanning technology, which represents an unclothed image of specific passengers, can not be used. It is important that legislation preserves the privacy and dignity of passengers by not allowing technology that presents a detailed unclothed image of a specific passenger."

Literature provided by Customs said the technology was developed to enhance the service's "ability to detect smugglers at the border".

A decision is yet to be made on whether Customs will purchase the equipment. "Having completed the trial, Customs will now move to analyse the results and assess the likelihood of any future use," the service said.

"Passengers searched during the trial were offered the choice of the scanner. The trial looked to see if there was a preference for a less-invasive alternative to physical personal searches that maintained Customs' effectiveness in detecting items, such as drugs, hidden beneath clothing."

Customs Minister Maurice Williamson would not comment.