PORTLAND, Maine — Three Portland residents suing to wipe out an ordinance preventing them from panhandling or protesting in median strips told the court in their final filing this week that the city overstated the danger in those locations.

The city, in turn, used its final salvo in the case to accuse the plaintiffs of muddying what is essentially a First Amendment case with “red herring” debates about what constitutes a median strip and whether pausing to plant a campaign sign is a violation of the new ordinance.

After filing their last written arguments in the case by Monday’s deadline, both parties now await the ruling of U.S. District Court Judge George Z. Singal. Attorneys for both sides have said it could be several weeks after the final arguments before Singal issues his decision.

At issue in the case is an ordinance approved by the City Council in July prohibiting individuals from stopping in the median strips, a measure councilors said was made strictly with safety in mind.

Police Chief Michael Sauschuck has argued on multiple occasions that the ordinance is necessary, in part, because of complaints his department receives about panhandlers in the median strips being violent toward passing drivers or being drunk and in danger of falling into traffic.

Opponents of the ordinance have said they consider the measure a thinly veiled attempt to sweep the city’s poverty problem out of sight.

In September, Alison Prior, an unemployed, homeless woman who uses the median strips for panhandling, joined political demonstrators Wells Staley-Mays and Michael Cutting to sue the city over the ordinance, saying it unnecessarily infringed on their First Amendment free speech rights.

In its final filing this week, the city agreed that the case boils down to a First Amendment dispute, but argued the plaintiffs’ rights are intact because they can still conduct the same panhandling or protesting activity on nearby city sidewalks without being in dangerous proximity to moving vehicles.

Furthermore, the city, represented in the case by police attorney Trish McAllister, wrote in its filing that the plaintiffs were attempting to distract the court from that fact with “odd” side-arguments and “inappropriate accusations regarding ‘confused’ public officials.”

The plaintiffs’ attempts to discredit the ordinance by asking whether people would be prohibited from using the bench in a particularly wide median in the city’s Boothby Square, or whether individuals could pause long enough to quickly plant a campaign sign during election season, are “red herrings” meant to confuse the issue, McAllister wrote.

The city attorney wrote that officers would be able to use reasonable discretion when enforcing the ordinance, and those issues don’t detract from the plaintiffs’ First Amendment ability to demonstrate in less dangerous places nearby.

But attorney Kevin Martin, representing the plaintiffs alongside American Civil Liberties Union of Maine Legal Director Zachary Heiden, argued that the Boothby Square and campaign sign loopholes, among others, showed that the true meaning of the ordinance is a “moving target” and is crafted too broadly to be effective.

Martin reiterated in his final filing this week that the activity truly causing the dangerous situations cited by the city are largely already illegal. Ordinances are already on the books prohibiting so-called aggressive panhandling, and there are state laws against assault, disorderly conduct and blocking traffic ways, he argued.

To the degree additional safeguards are necessary, Martin argued, the city could have implemented a more specific ordinance — prohibiting being on the median strips while intoxicated, for instance — that would have preserved the free speech rights of panhandlers and protesters who are not behaving inappropriately.

Martin challenged the city’s concern about danger in the median strips as overstated, rejecting what he called a city argument that “every median in Portland is a deathtrap.”

He pointed to police data showing that, although complaints about panhandlers in median strips increased by 23 percent from 2012 to 2013, that only worked out to about one extra complaint call per week, and calls to police about median strip panhandlers increased less than calls about panhandlers on the sidewalks over that span.

Martin also pointed out that the city was only able to generate as evidence one previous incident in which a person was struck by a motor vehicle on a median strip, and in that case, the victim was a bicyclist crossing the road in a manner that wouldn’t have been prohibited under the ordinance. The driver in that incident, he noted, was “an unlicensed driver who drove partially up onto the median.”

“All told, this small absolute number of incidents does not constitute an ‘emergency,’ and to the extent the increase can possibly be cast in such terms, it was an emergency not specific to medians but instead specific to drunk and dangerous behavior on both medians and sidewalks — behavior already criminal under Maine and Portland law,” Martin wrote, in part.