Mr. Dhingra faces four felony gun charges, including possession of the bump stock, possession of firearms and ammunition by someone who had been committed to a mental institution, and two counts of making false statements about his mental health history when he bought the guns from Houston-area dealers.

If convicted, he could be sentenced to up to 10 years in prison and fined $250,000 on each charge.

David B. Adler, Mr. Dhingra’s lawyer, declined to comment on Thursday. Mr. Dhingra is being held in a federal detention center in Houston, prison records show.

A bump stock replaces a rifle’s standard stock, which is the part held against the shoulder. The stock “bumps” back and forth between the shooter’s shoulder and trigger finger, causing the rifle to rapidly fire again and again.

Interest in bump stocks surged after the mass shooting at a concert in Las Vegas in October 2017. The gunman had a dozen rifles outfitted with bump stocks and killed 58 people and wounded hundreds of others.

Lawmakers in both parties then expressed openness to banning the bump stocks.

President Trump announced the rule banning bump stocks after the February 2018 shooting at Marjory Stoneman Douglas High School in Parkland, Fla., that left 17 people dead. The gunman in the Parkland shooting did not use a bump stock.