A U.S. law stopping people from carrying firearms inside post offices has been ruled unconstitutional by a federal judge in Florida. U.S. District Judge Kathryn Kimball Mizelle issued the ruling on Friday as she dismissed a portion of an indictment that charges a postal worker identified as Emmanuel Ayala with the illegal possession of a gun in a federal facility.

Mizelle ruled that the possession charge was a violation of Ayala’s right to keep and bear arms under the Second Amendment of the U.S. Constitution. According to her, “[A] blanket restriction on firearms possession in post offices is incongruent with the American tradition of firearms regulation.”

In her decision, Mizelle cited a 2022 landmark U.S. Supreme Court ruling that expanded rights to carry and bear arms.

The ruling, tagged New York State Rifle & Pistol Association v. Bruen, established an individual’s right to carry a handgun in public places for self-defense purposes. It also established a new test that can be used to assess firearms restrictions to ensure they are “consistent with this nation’s historical tradition of firearm regulation.”

Prosecutors allege that Ayala, a truck driver for the U.S. Postal Service in Tampa, brought a Smith & Wesson 9mm handgun onto Postal Service property back in 2012 and tried to evade federal agents who attempted to detain him. He was later arrested and charged under a provision that prohibits possessing a firearm in any federal facility.

Ayala’s lawyers, however, argued that he had a concealed weapons permit and had the gun on him for self-defense.

Mizelle sided with the defendant’s challenge to the weapons charge, saying that there was no federal law banning guns in government buildings until 1964 and post offices until 1972 even though post offices date as far back as the county’s founding.

According to her, there is no historical practice from the 1700s that justifies the prohibition of guns in post offices and government buildings. Hence, she determined that letting the federal government restrict visitors from bringing firearms into government buildings would be letting the government “abridge the right to bear arms by regulating it into practical non-existence.”

While she dismissed the firearms charge against Ayala, the judge upheld a separate charge for forcibly resisting arrest.