Note

Can Someone in the U.S. Unlawfully Have a Gun? Federal Law Says No

It is a federal crime for someone in the U.S. unlawfully to have a gun or ammunition, and Second Amendment challenges to that law have so far failed.

Written by Brandon Sample · Updated · Filed under Federal sentencing legislation

On this page

Is it a crime to have a gun while in the U.S. unlawfully?

Yes. It is a federal crime for someone who is in the United States illegally to have a gun or ammunition. That law is 18 U.S.C. § 922(g)(5)(A), and federal appeals courts have consistently upheld it against Second Amendment challenges.

Update (October 2026): This post was written in 2019 about United States v. Torres, 911 F.3d 1253 (9th Cir. 2019). The law has changed since then. In 2022, the Supreme Court ruled in N.Y. State Rifle & Pistol Ass'n v. Bruen, 597 U.S. 1 (2022), that gun laws must be judged by the nation's history and tradition, not by "intermediate scrutiny." On January 2, 2026, the Ninth Circuit overruled the part of Torres that used intermediate scrutiny, in United States v. Vazquez-Ramirez, No. 24-3544. But it still upheld the gun ban for people unlawfully in the country, and it noted that every other federal appeals court to decide the issue has done the same.

Which constitutional protections apply to people in the country unlawfully has been hotly debated as immigration stays in the national headlines. Many federal courts have avoided clear rulings on which rights apply. The Ninth Circuit's 2019 decision in United States v. Torres is a reminder that even as unlawful aliens gain access to due process and fair treatment, they are still subject to federal laws that restrict them more than U.S. citizens or legal residents.

The Second Amendment question

In District of Columbia v. Heller (2008), the Supreme Court held that the Second Amendment protects an individual right to keep a gun for self-defense. The amendment protects "the people."

Courts disagree about whether "the people" includes someone who is in the country unlawfully, for purposes of the right to self-defense. Many appeals courts have been unwilling to rule clearly on it. Some say no. Others, like the Ninth Circuit, have assumed the answer is yes without deciding it, and then upheld the law anyway.

What happened in Torres

Torres was convicted of having a gun while unlawfully in the U.S. He was sentenced to 27 months in prison and three years of supervised release. Supervised release is a period of supervision, like probation, that starts after prison.

He admitted he was here unlawfully and had the gun. But he appealed his conviction and sentence, arguing the law violated the Second Amendment. The government argued that Heller made clear that Second Amendment protections are tied to citizenship.

The Ninth Circuit rejected the government's argument that Heller had settled which groups of people the Second Amendment protects. The court noted that unlawful aliens do have constitutional rights, but said the law is unclear on how far those rights reach. Instead of drawing a bright line, it took a shortcut.

The Ninth Circuit assumed, without deciding, that unlawful aliens have some Second Amendment rights. It then applied "intermediate scrutiny," a middle-level test, and found that the ban was a reasonable fit for the government's strong interest in public safety and crime prevention. The court chose that middle-level test, instead of the strictest test ("strict scrutiny"), because the ban is not lifelong. A person can pursue lawful status and then is no longer covered. The court said the government has a "strong interest" in protecting the public from people who have already broken the law by entering the country unlawfully. It affirmed his conviction and upheld § 922(g)(5).

What changed after Bruen

Bruen threw out the "intermediate scrutiny" test for gun laws. Now the government must show that a gun law fits the nation's historical tradition of gun regulation.

In Vazquez-Ramirez (2026), the Ninth Circuit applied that new test. It again assumed unlawful aliens could be part of "the people." But it held that the government showed § 922(g)(5)(A) fits historical tradition. So the conviction stood.

The bottom line is the same as in 2019: the ban remains enforceable, and Second Amendment challenges to it have so far failed in the federal appeals courts.

If you are not a citizen and facing federal charges

Torres is a reminder that the federal criminal system is far more complicated for defendants who are in the country unlawfully. If you or a loved one has a pending federal case and is not here lawfully, there are special issues to account for in the defense. A federal conviction can carry immigration consequences on top of prison time, including removal (deportation). Those issues should be weighed before any plea. Defense lawyers have a duty to advise non-citizen clients about the deportation risk of a guilty plea (Padilla v. Kentucky, 559 U.S. 356 (2010)), so ask about it directly.

If there is an appeal, timing matters. In a federal criminal case, the notice of appeal generally must be filed within 14 days after the judgment is entered (Fed. R. App. P. 4(b)(1)(A)).

It is important to work with a lawyer who understands how immigration status can complicate a case or an appeal. Brandon Sample handles federal criminal appeals regardless of the defendant's immigration status.

Facing a federal sentence? Book a consultation to talk it through with Brandon Sample.

Talk it through

Book a consultation

Questions about a federal sentence? Book a consultation to talk it through with Brandon Sample. We'll listen, tell you whether we can help, and explain what comes next.

Contacting us does not create an attorney-client relationship. Unsolicited information you send may not be confidential.