BERLIN — A German who found himself in hot water for joking during airport security checks that he had explosives in his underwear turned out on Thursday to be a policeman.

The 42-year-old, who has not been named, was briefly taken into custody at Stuttgart airport in south-west Germany on Tuesday after making the joke, which he then repeated when questioned by airport security personnel.

Prosecutors are considering pressing charges against the man, who had been due to fly to Egypt with his wife and child on holiday, and he also faces a fine of 1,000 euros (1,430 dollars), a police spokeswoman said.

Security at airports has been stepped up around the world after a Nigerian man with suspected al-Qaeda links allegedly tried to blow up an airliner over the United States on December 25 with explosive chemicals sewn into his underpants.