PROVIDENCE, R.I. — A federal judge issued an order Thursday temporarily barring the city of Cranston from enforcing an ordinance that prohibits panhandling at busy intersections.

U.S. District Judge William Smith wrote that the Rhode Island chapter of the American Civil Liberties Union was likely to succeed in its lawsuit challenging the constitutionality of the ban. He issued a temporary restraining order pending a final decision about whether the ordinance violates the First Amendment.

Cranston Mayor Allan Fung said he was disappointed by the decision and that city officials carefully crafted the ordinance to ensure public safety on the city’s roads.

“I’m going to continue to press the legal case, even if it means going to the U.S. Supreme Court,” he said in an interview.

The conflict is part of a long-running battle in Cranston, which last year acknowledged a city panhandling ban instituted in 2015 was unconstitutional. The city agreed to settle a different ACLU lawsuit and stop enforcing that ordinance.

Fung said they took their time to find the right balance before bringing forward a new ordinance that passed the City Council 5-4 in February.

The judge said the ordinance is broad and prohibits everything from firefighters passing the boot, to someone giving directions to a lost motorist or to candidates for office handing out fliers. He says the city submitted no evidence that connects the prohibited activities to accidents.

“The upshot is that, while perhaps a close call at this preliminary stage, the ordinance does not appear narrowly tailored to the stated government interest,” Smith wrote.