Maplewood will pay its departing part-time firefighters an extra $1,000 for every year they worked to settle a lawsuit over who would get a pension surplus of about $1.5 million.

The settlement agreement, recently approved by both the city and the firefighters, ends a fight that began when the City Council decided in January to switch from a staff of part-timers to a full-time fire department.

The staff change meant that 16 part-time firefighters who wouldn’t be offered one of nine full-time jobs would be let go and the council would try to terminate the pension fund, the Maplewood Fire Relief Association.

As of December, that fund had grown to about $4.9 million and firefighters were owed $3.4 million in benefits. That left about $1.5 million in surplus. Under state law, the money not used by a pension when it is terminated can be returned to a municipality’s general fund.

But shortly after the council announced its decision to create a full-time department, the firefighters on the pension board met to change the retirement plan from a defined benefit plan to a defined contribution plan.

That meant that, instead of using the pension fund to pay out to each firefighter the fixed amount that had been set for years — $10,000 per year of service — the pension fund would be opened up and firefighters would be entitled to split up to 90 percent of it.

Had the change gone through, the 16 part-time firefighters who were losing their jobs would have been paid an average of just more than $50,000 on top of the $10,000 per year they were owed, according to the city’s complaint. Another 18 firefighters who had already retired or left the city would have received an average of about $20,000 along with their $10,000 per year of service.

The City Council sued the Fire Relief Association in February, saying it didn’t have the authority to change from a defined benefit plan and had held secret meetings to do so without proper notice.

The relief association disputed that the meetings were held in secret and said that state law gave them the power to change its bylaws. In a counterclaim, the relief association argued that the city’s lawsuit was “a naked attempt to steal retirement benefits.”

Then state lawmakers stepped in. They approved special legislation this spring that barred the Fire Relief Association from dividing up the pension surplus. It instead ordered the association either to give the surplus to the city, or pay back whatever contributions the city had made to it on the firefighters’ behalf since it was created in 1997 — a figure also roughly $1.5 million.

The law also required both the relief association and the city to reach a settlement over a lump sum payout to the 16 firefighters losing their jobs.

The two sides agreed that the firefighters — whose years of service ranged from eight to 28 years — each would get a lump sum of $11,000 per year of service, up from $10,000. They also agreed that all firefighters would be fully vested.

Jeff Morgan, vice president of the Fire Relief Association, said the part-time Maplewood firefighters took the job despite relatively low pay because they knew the trade off was going to be the pension.

“It’s like a messy divorce,” Morgan said. “It was new territory for everyone because it’s not a normal thing to dissolve a volunteer department and a Fire Relief Association.” The firefighters wanted the relief association to continue under the new department, he said.

City Manager Melinda Coleman couldn’t say how much of the $1.5 million surplus will be left after the payouts. Attorney’s fees for both sides will be paid from that pool of money.

“We’re glad that the legislation happened and we’re moving forward,” Coleman said.

Morgan estimated that the total attorney’s fees could reach as high as $500,000.

“We’re not happy we left money on the table, but it was getting to the point where it was all going to legal fees,” he said. “We felt betrayed by the city that they were trying to monetize this by taking our pension, and we couldn’t let it just happen.”