Semi-automatic pistols for sale. (CNN)Federal regulations setting a minimum of 21 years old for purchasing handguns from licensed dealers violate the Second Amendment, a federal appeals court ruled Tuesday. The restrictions were deemed unconstitutional by a divided three-judge panel of the 4th US Circuit Court of Appeals. The majority opinion, written by Donald Trump-appointee Judge Julius N. Richardson, said the laws relegated "either the Second Amendment or 18- to 20-year-olds to a second-class status." "Looking through this historical lens to the text and structure of the Constitution reveals that 18- to 20-year-olds have Second Amendment rights," he wrote. "Virtually every other constitutional right applies whatever the age. And the Second Amendment is no different." Richardson was joined by Judge G. Steven Agee, who was appointed by George W. Bush. Federal judge overturns California’s ban on assault weapons and likens AR-15 to Swiss Army knife Judge James A. Wynn, Jr, a Barack Obama appointee, dissented. He accused the panel majority of granting "the gun lobby a victory in a fight it lost on Capitol Hill more than fifty years ago," and said the ruling was not "consistent with the proper role of the federal judiciary in our democratic system." This story is breaking and will be updated.