A U.S. ban on the interstate sales of handguns by federal firearms dealers to buyers from other states violates the U.S. Constitution, a federal judge in Texas ruled on Wednesday.

The ruling by U.S. District Court Judge Reed O’Connor stemmed from a challenge to the ban brought by a Texas firearms dealer and a couple from the District of Columbia in July 2014.

ADVERTISEMENT

The federal law prohibits a dealer from transferring a handgun, but not a rifle or shotgun, to an individual who does not live in the state in which the dealer’s business is located.

“While we expect the government to appeal, we are confident that the 5th U.S. Circuit Court of Appeals will agree with Judge O’Connor’s sound ruling,” attorney William Mateja, who represented the challengers, said in a statement.

Andrew and Tracey Hanson met with licensed firearms dealer Fredric Mance Jr. in Texas about buying two handguns, but did not complete the transaction because they could not take immediate possession of the weapons, according to court papers.

Federal law required Mance to transfer the handguns to a federally licensed dealer where the Hansons live, Charles Sykes in the District of Columbia, where they could complete the purchase after paying shipping and transfer fees.

The Hansons and Mance, all members of the Citizens Committee for the Right to Keep and Bear Arms, argued in their lawsuit in the U.S. District Court for the Northern District of Texas that the ban limits consumer choices and infringes on their rights.

ADVERTISEMENT

O’Connor found that the ban violated the second and fifth amendments to the U.S. Constitution. He also distinguished the ban from other firearms restrictions such as those that target specific people, such as felons or the mentally ill.

“As law abiding, responsible citizens, the Hansons likely do not pose the threat to public safety that motivated Congress to enact the federal interstate handgun transfer ban,” O’Connor wrote in his decision.

O’Connor said the government demonstrated a compelling interest in preventing handgun crime, but failed to show how the transfer ban alleviates the problem of prohibited people acquiring handguns by crossing state lines.

ADVERTISEMENT

(Reporting by David Bailey in Minneapolis; Editing by Sandra Maler)