Foreign Minister Murray McCully was searched at Auckland Airport before flying out to the United States last month.
The random search happened despite McCully travelling on a diplomatic passport.
A spokeswoman for McCully said the search was the result of an "administrative error".
"Due to an administrative error in New Zealand the Minister was subject to a random search before departing for Washington. The Minister was not screened in the United States."
McCully was flying to Washington on March 21 for a meeting on fighting Isis.