A Toronto man learned the hard way Sunday about items not allowed on U.S. flights leaving Buffalo Niagara International Airport – like his samurai sword.

A Transportation Security Administration officer at a checkpoint X-ray machine spotted the 3-foot martial arts-style samurai sword among the man’s carry-on items. The sword was in a sheath and packed in its own box, a TSA spokeswoman said.

The man surrendered the sword and was able to catch his flight, and there was no impact to airport operations, the spokeswoman said.

Niagara Frontier Transportation Authority spokesman C. Douglas Hartmayer said the unidentified passenger was not charged.

Hartmayer said the passenger simply did not understand the rules.

“He thought the sword would be permitted,” he said. “But he was mistaken.”

Weapons – including swords – are not permitted in carry-on baggage, the TSA said.