PROVIDENCE, R.I. – Providence’s mayor on Friday said he is relieved — and grateful — that the city’s police, firefighters and retirees have approved a negotiated settlement freezing pensions and making other benefits changes that have helped avert a municipal bankruptcy and stave off costly litigation.

The city’s police union was the last to vote, on Thursday, to approve the agreement, which suspends cost-of-living increases for 10 years, caps pensions and shifts retirees to Medicare when they are eligible.

“I feel relieved because it’s been a long and tough journey to this point,” Mayor Angel Taveras said in an interview. “I wasn’t always convinced that we’d get to this point.

“I think that the negotiated settlement, while not perfect, is a bold step forward,” he said.

The city firefighters union approved the settlement last month, though union head Paul Doughty is holding another vote, likely by the end of the year, because of what he called a “small but significant” fix to city documents.

The settlement resolves two lawsuits against the city that had been brought by the police and fire retiree associations. Without the concessions, Taveras had warned that Providence might be forced to go the way of Central Falls, which was taken over by a state receiver in 2010 and recently exited a painful municipal bankruptcy.

Taft Manzotti, president of the Providence police union, on Friday called the pension freeze, and other changes, necessary.

“It’s something that had to be done one way or another,” he said. “We’re part of the solution.”

The negotiated agreements in Providence are in stark contrast to the legal wrangling over an overhaul of the state pension system the General Assembly passed last year, which included a suspension of automatic pension increases and a bump up in retirement ages. Public-sector unions have sued the state over the changes, saying they are unfair and unconstitutional.

Treasurer Gina Raimondo and state leaders say the overhaul was necessary to prevent escalating pension costs from crippling state finances.

In Providence, the negotiations with the unions and retirees were part of an effort by Taveras to close a $110 million deficit in the last fiscal year — a crisis he dubbed a “Category 5 fiscal hurricane.” Taveras was able to extract millions more in voluntary payments in lieu of taxes from several non-profit institutions, including Brown University. He also raised taxes and fees, closed several schools and reduced the city payroll by some 200 people.

The city says the pension and Medicare agreement saves around $18.5 million in the current fiscal year, which began July 1, and reduces its unfunded pension liability by $178 million, from $903 million.

Officials expect the settlements to be approved by April 1.