A Texas judge ruled that a state law preventing adults under 21 from carrying a handgun was unconstitutional. 

Carrying a handgun in Texas wasn’t a problem for gun-owning adults who had a license to do so. However, because the state didn’t hand out licenses for anyone under 21, legal handgun owners were prevented from carrying their firearms outside of their homes. 

In this Jan. 26, 2015 file photo, a supporter of open carry gun laws, wears a pistol as he prepares for a rally in support of open carry gun laws at the Capitol, in Austin, Texas.

In this Jan. 26, 2015 file photo, a supporter of open carry gun laws, wears a pistol as he prepares for a rally in support of open carry gun laws at the Capitol, in Austin, Texas.

On Thursday, U.S. District Judge Mark Pittman ruled that the Second Amendment prevents restricting the rights of gun owners based on their age. 

TEXANS WILL BE ABLE TO CARRY HANDGUNS IN PUBLIC WITHOUT A LICENSE ON SEPT. 1 UNDER ‘CONSTITUTIONAL CARRY’ LAW

"Based on the Second Amendment’s text, as informed by Founding-Era history and tradition, the Court concludes that the Second Amendment protects against this prohibition." Pittman wrote. "Texas’s statutory scheme must therefore be enjoined to the extent that law-abiding 18-to-20-year-olds are prohibited from applying for a license to carry a handgun."

Two unnamed plaintiffs, an 18-year-old and a 20-year-old, along with the Firearms Policy Coalition, filed the lawsuit challenging Texas’ law in November. 

A handgun

A customer shops for a pistol at a sporting goods store. (Scott Olson/Getty Images)

Pittman noted the Second Amendment doesn't contain any mention of age as a restriction, unlike other portions of the Constitution. 

"To start, the Second Amendment does not mention any sort of age restriction," he wrote. "This absence is notable—when the Framers meant to impose age restrictions, they did so expressly."

Thursday’s ruling comes on the heels of a major victory for Second Amendment advocates in June when the Supreme Court struck down a restrictive New York law on issuing concealed carry licenses. 

CLICK HERE TO GET THE FOX NEWS APP

Pittman’s ruling also builds on top of the permitless carry law in Texas that Gov. Greg Abbott signed last year. The state’s "constitutional carry" law allowed Texans over the age of 21 to carry handguns in public without a license.