A Montgomery County judge ruled yesterday that a referendum aimed at banning handguns in Takoma Park should be removed from Tuesday's ballot because the questions didn't follow state law.

Circuit Court Judge Vincent E. Ferretti Jr. ruled that the phrasing of two of three questions on the ballot amounted to a straw poll, which is not permissible under state law. The third ballot question, which would mandate a broad handgun ban, would be a "misuse of the election process." State law prevents municipalities from enacting gun control laws except under narrow exceptions.

"This is a state issue, and [city officials] ought to keep out of it," said Michael L. Cohen, a Takoma Park resident for more than 20 years, who was one of two people to sue the city over the proposed referendum. Cohen said that he owns handguns and that "if this law had gone into effect, they would have made me a criminal. This shows what happens when government goes off the deep end."

Anti-gun activists vowed to continue their crusade after Election Day. They received word of the decision just as they were meeting in a downtown park for an anti-handgun rally and news conference featuring Maryland Attorney General J. Joseph Curran Jr. Curran announced a series of new gun control restrictions last week that he hoped would lead to an eventual ban on handguns for all but police officers, the military, sports shooters and a limited number of people seeking self-protection.

"It's not the end, just the beginning of the battle," said Tom Mooney, an attorney for Citizens Against Hand Guns, the group that pushed for the referendum.

Two City Council members, Marc Elrich and Larry Rubin, said they planned to move ahead on drafting an ordinance to ban handguns. They said they hoped it could be worded properly to meet state law, which allows exceptions to protect minors and for some public spaces.

Rubin said opponents of gun control have a "cowboy image of America." But, he told the dozen or so supporters at the park, "every cowboy picture I ever saw you had to check your guns at the town door, and that's what we want to do in Takoma Park."

The issue has been roiling the Montgomery County community because of fears a ban might prompt an expensive lawsuit from the National Rifle Association or another pro-gun organization.

Past efforts to legislate issues covered by state law have proved costly to Takoma Park. It lost a legal battle several years ago after trying to ban cigarette vending machines.

The handgun ban, similar to one in the District, would have been a first in Maryland.

Staff writer Scott Wilson contributed to this story.