A gun-rights-advocacy group sued Mayor Michael R. Bloomberg on Tuesday, claiming that the city fee for obtaining a home-handgun permit was so excessive that it impinged on the Second Amendment.

The group, the Second Amendment Foundation, based in Bellevue, Wash., is focusing on New York’s fees because, according to the group, the city is one of the few places in the country that requires people to obtain permits to keep guns in their homes.

The city’s fee is $340, plus a $94.25 charge for a fingerprint check. The fee in most other places in the state is $10, according to the foundation. Mr. Bloomberg has long been a staunch supporter of gun control and has made efforts to reduce the traffic in guns into the city through sting operations, lawsuits against gun dealers and other antigun measures.

The city’s fee for obtaining a home gun permit has long been in place.

The suit, filed in federal court, claims that the city’s fee is so exorbitant that it “impermissibly burdens the Second Amendment right to keep and bear arms,” and the suit argues that because city residents are forced to pay more than others, the fee also violates the 14th Amendment’s equal-protection clause.