In a rare case of gun rights and religious freedom overlapping, an Amish man from Pennsylvania is challenging a federal law that requires a photo ID to buy a firearm, saying that his religious beliefs prevent him from being photographed.

Andrew Hertzler filed a suit on Friday in the US Middle District Court claiming that the photographic identification requirement violates both the Religious Freedom Restoration Act and his constitutional right to bear arms.

Hertzler tried to purchase a firearm at a Pennsylvania firearm dealer with a state-issued ID. The sale was denied because the identification card didn’t have a photograph on it, which the law requires.

The suit names defendants as the federal government, US Attorney General Loretta Lynch and FBI Director James B. Comey, as well as Thomas E. Brandon and Christopher C. Shaffer, the acting director and the assistant director of public and government affairs, respectively, for the Bureau of Alcohol, Tobacco Firearms and Explosives (ATF).

Hertzler is an “active and practicing” member of the Amish community in Lancaster County and desires a firearm for self-defense, according to the lawsuit. It also says that part of his Amish faith is “a sincerely held religious belief” that prevents him from having his photograph taken.

“The Amish faith prohibits an individual from having his/her photograph taken,” the suit reads. “This belief stems from the Biblical passage Exodus 20:4, which mandates that ‘You shall not make unto thee any graven image, or any likeness of anything that is in heaven above, or that is in the earth beneath, or that is in the water under the earth’, as well as the Christian belief in humility.”

Hertzler could purchase firearms without photo identification by applying for a federal firearm license, which would allow him to sell, make or transfer firearms, but the suit states that he has no interest in doing that. He also attempted to reach out to Sen. Pat Toomey (R-Pennsylvania), who contacted the ATF, but the senator couldn’t help his constituent. Toomey said that the bureau responded by saying federal laws require photographic identification when buying a gun without exception.

This forced Hertzler to choose between foregoing his constitutional right to keep and bear arms or violates his religion, the suit says. He contends that a state’s non-photo ID, along with other documentation, should be sufficient.

The federal government passed the Religious Freedom Restoration Act in 1993, and Hertzler’s suit argues that it protects him from this type of dilemma.

“By knowingly and willingly sitting for a photograph, even for a state-issued identification document, Mr. Hertzler would be violating his religion by taking a graven image of himself,” the suit read. “Thus, Mr. Hertzler’s religious freedom has been substantially burdened ‒ in order to exercise his fundamental right to possess a firearm for defense of himself and his home, the Government is requiring him to violate a major tenet of his sincerely held religious belief.”