A U.S. air marshal left a loaded gun in the bathroom stall of a New Jersey airport last month, reports revealed Friday.

The federal marshal, whose name has not been released, was using the men's restroom at Terminal C at Newark Liberty International Airport when he left a handgun on top of a toilet paper dispenser, the NJ Advance Media reported.

He then boarded a flight as per his protection assignment, an unnamed Transportation Security Administration agent and law enforcement official told the news site.

A janitor discovered the weapon and sealed off the stall after alerting a supervisor. Port Authority Police retrieved the weapon, which was loaded, and traced it back to the air marshal.

The nature of the marshal's assignment is unclear, and the TSA declined to comment. Air marshals, a law enforcement branch of the TSA, operate under the radar to allow them "to detect, deter, and defeat hostile acts targeting U.S. air carriers, airports, passengers, and crews," according to the administration's website.

Port Authority Police also declined to comment on the incident.