Chief U.S. District Judge Brian Jackson ruled that a Baton Rouge, La., law prohibiting storage of firearms in vehicles while the owner is in an establishment that serves alcohol is unconstitutional.

In October of 2012, Ernest Taylor of Baton Rouge was pulled over by police for a routine traffic stop. Taylor was arrested because he informed them that he had guns in his car and he had just left a place that serves alcohol.

In September, Taylor challenged the law, claiming that it contradicts a 2008 Louisiana state law which permits firearms in locked vehicles in any designated parking area. The Baton Rouge ordinance clearly states that possession of firearms in any parking lot of an establishment that serves alcohol is illegal.

“Thus, any law-abiding citizen who exercises his or her right to keep or bear arms within the confines of his or her personal vehicle will violate [the ordinance] anytime he or she, for example, stops to refuel a vehicle at a service station that sells alcohol, or stops to purchase groceries at a grocery store that sells alcohol. Similarly, the ordinance prohibits law-abiding citizens from purchasing and possessing firearms at any establishment that sells alcohol, thereby rendering the sale of firearms at establishments like Wal-Mart a criminal act,” the judge wrote in his order.

The judge’s ruling removes the contradictions and allows gun owners to keep their guns in their vehicle while stopping at restaurants, bars, and stores that sell alcohol. Additionally, Taylor will be awarded monetary damages.

It remains illegal in Louisiana to carry a gun into bars or restaurants that serve alcohol.