The city of Portland will pay $175,000 to cover legal costs incurred by the American Civil Liberties Union of Maine in its successful challenge to an ordinance restricting people from panhandling on city medians.

The payment agreement, notice of which was filed in federal district court in Portland Wednesday, is the last remaining obligation from the lawsuit and appeal regarding the city’s ordinance.

Originally proposed as a public safety measure, the ordinance was passed by the Portland city council in July 2013 to prevent panhandlers from walking or stumbling into traffic.

The ordinance was quickly challenged, however, with opponents saying that regardless of its intent, the ordinance in practice forced homeless or transient people from city medians, where they had stood for years holding signs asking for money from passing motorists.

The Maine ACLU and the law firm Goodwin Procter filed suit against the city on behalf of three residents, arguing the ordinance constituted an infringement on the free speech rights of panhandlers and other sign-holders.

The city agreed not to enforce the ordinance until the legal challenge was resolved.

A federal judge declared the ordinance unconstitutional in 2014, but the city appealed to the 1st U.S. Circuit Court of Appeals in Boston early this year. The three-judge appellate panel struck down the ordinance, and the city council voted in September not to pursue any further legal challenge.

“Overall, the city is pleased that this matter is finally resolved so as to avoid any additional unnecessary protracted litigation,” said Jessica Grondin, Portland’s director of communications.

Grondin said the $175,000 has been budgeted and will be drawn from the city’s legal department funds.

It is the latest lawsuit that has proven costly for the city.

In October, the city agreed to pay $56,500 in legal costs to settle a lawsuit filed by anti-abortion activists over an ordinance that established a 39-foot no-protest zone around a Portland clinic that provides abortions.

After the U.S. Supreme Court struck down a similar buffer zone law in Massachusetts while the Portland case was ongoing, the city council repealed its ordinance and moved to have the case dismissed.

A federal judge gave the plaintiffs the option to file for legal costs and damages, and the city settled for $56,500.

The city also faced legal costs in March associated with a lawsuit filed by a Bar Harbor couple who were arrested after they filmed police in the Old Port. That settlement, including attorney’s fees, cost city taxpayers $72,000.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.