A 1st Circuit U.S. Court of Appeals judge in Boston ruled Friday that a Portland ordinance aimed at preventing panhandlers from standing on city street medians is unconstitutional.

It was the second time a federal judge ruled against the city, which could appeal the decision to the U.S. Supreme Court, try to rewrite the ordinance or drop the effort. The city has 90 days to decide whether to file an appeal.

The City Council passed an ordinance in July 2013 prohibiting people from standing on street medians, including people who are asking passers-by for money.

At the time, city officials primarily expressed safety concerns about panhandlers walking or stumbling into traffic. Critics called the ordinance an attempt to move panhandlers to less visible locations. The city has suspended enforcement of the ordinance while trying to defend it in court.

The ordinance was challenged in federal court by the American Civil Liberties Union of Maine and the Boston-based Goodwin Procter law firm, which represented three residents: Wells Staley-Mays and Michael Cutting, two political activists; and Alison Prior, who has stood on medians holding a sign asking for money. The plaintiffs argued that the ban was an unconstitutional restriction of free speech.

A U.S. District Court judge in Portland ruled in February 2014 that the city ordinance violated the First Amendment rights of panhandlers. The city appealed the ruling and both sides made their arguments before the appeals court in Boston in January.

On Friday, an appeals judge upheld the lower court’s ruling.

“The city may have been motivated by a perfectly understandable desire to protect the public from the dangers posed by people lingering in median strips,” appeals Judge David Barron wrote. “But the city chose too sweeping a means of doing so, given the First Amendment interest in protecting the public’s right to freedom of speech. Thus, the judgment of the District Court is affirmed.”

Barron said that median strips are public forums – like parks and sidewalks – and the government’s ability to restrict speech is limited in those areas.

“There is no doubt that the ordinance imposes ‘serious burdens’ on speech,” he wrote.

The ACLU of Maine praised the ruling.

“This is a significant victory not only for people here in Portland, but for people across the country,” said Zachary Heiden, legal director for the ACLU of Maine.

“I’m glad they’re keeping it legal,” said Louis Walker, 32, who said he’s been panhandling on city streets for about three weeks and is living in a tent in the woods in Portland.

Walker said he suffers from a childhood brain injury and has been forced to turn to panhandling because he hasn’t found someone to hire him because he’s disabled.

Walker said he is embarrassed about having to panhandle, but feels he has no other choice. Panhandlers, he said, don’t force themselves on people.

“People don’t have to give us money – they only do it out of the kindness of their hearts,” he said. “If you don’t want to give us money, then you don’t have to. This is something I have to do to get money for me and my wife.”

City Hall Communications Director Jessica Grondin said the city is reviewing the decision and staff likely will meet with city councilors on Sept. 21 to discuss the city’s options.

Mayor Michael Brennan said he would like to discuss the ruling with city attorneys before deciding on a next step, which could include drafting a new ordinance in an effort to address the court’s concerns.

“I haven’t had a chance to review it yet at this point,” Brennan said. “I hope that there will be some guidance in (the ruling) in terms of what we might look at going forward.”

Heiden said he doesn’t believe drafting a new ordinance is worth the effort.

Police stopped enforcing the ordinance shortly after the ACLU of Maine filed its lawsuit in September 2013.

“Over that time, we’re not aware of any significant safety problems with people on median strips in Portland, whether they’re protesters or people asking for money,” Heiden said. “We don’t think there’s really a need for city action on this area. There are many more pressing problems in the city of Portland.”