PORTLAND, Maine (AP) — The Transportation Security Administration said Tuesday it caught a Maine man with a loaded handgun at an airport security checkpoint.

The TSA said the man was a Poland, Maine, resident who had the gun tucked in the outer pocket of a canvas messenger bag.

The man told officials he had forgot he brought the gun with him to Portland International Jetport.

An x-ray machine allowed a TSA officer to detect the gun, which was confiscated.

The TSA said the man was questioned and eventually allowed to return the firearm to his vehicle and come back to take his flight.