The city of Stockton's three-year fracas with its public employee unions officially ended Tuesday with the council's approval of a contract with the city's recalcitrant police.

"It's a good day all around," said Mayor Ann Johnston.

The benefits of the peace treaty go beyond ending an epic head-butting contest that saw costly lawsuits, blood-spattered billboards and the highly publicized union purchase of the house next to the city manager's.

With the agreement, the city not only ends all those shenanigans, it achieves a measure of solidarity with labor that will be important in bankruptcy court.

What a cage match.

The battle started in 2009 when the Great Recession made deep budget cuts necessary - ultimately upwards of $100 million worth. Labor was not on board, to put it mildly.

On the contrary. Many city employees reeled directly into stage one of Elisabeth Kýbler-Ross's Five Stages of Death: denial.

After that came lawsuits - by Fire, police and the Stockton City Employees Association, challenging the city's declaration of fiscal emergency.

There followed layoffs; Fire's campaign against Measure W's reforms; the firing of the fire chief; a countersuit from the city alleging "housegate" was an unfair labor practice; a lawsuit from the retiree's association; and other drama.

Throughout, the Stockton Police Officer's Association remained the hardliners. Well after other unions reached deals, it continued pressing its suit to force the city to restore $13 million in pay cuts. Even after the city filed for bankruptcy. All that is over. For the time being.

Police got a two-year contract that swallows cuts but preserves a couple prized perks such as longevity pay. The two-year term gives them respite from tiring contract fights. The city threw in some days off for dropping the lawsuit.

"I've heard it referenced as a consolation prize." Katheryn Nance, head of the police union, said dryly.

Still, Nance said, morale has improved somewhat; "The Exodus" - the flight of disgruntled officers out of the SPD to other city departments - is slowing, she said.

"We're just ready to move forward," Nance said.

She praised her fellow officers. "They're amazing individuals. They're very, very conscientious about looking out for what's best for our department as a whole. They (also) want to improve their relationship with the public."

The SPOA's decision was also pragmatic. Powerful Wall Street creditors are going after city employee pensions. It is in police's interests to stand with the city and oppose them.

As for bankruptcy, the resolution of the police labor dispute strengthens the city's hand. The city needs classes of creditors such as labor to approve its Plan of Adjustment, its proposal for paying creditors less than owed.

When enough parties agree, the federal judge will impose a cram-down on the holdouts. The city can then get on with a fresh start.

Vice Mayor Kathy Miller was pleased. "The fact that the SPOA as an organization and all of our employees are on board with unprecedented cuts and a complete restructuring of how they are going to be compensated, that makes us and our plan stronger. It gives us more credibility with our creditors and with the bankruptcy judge."

Stockton's public employee unions deserve credit. Their sacrifices, though reluctant, are big.

That said, it would not do to harbor too many illusions about a new, less grasping culture of public service. Probably when the economy recovers, the unions will go right back to pounding the bargaining table.

But, for now, the fighting is over.

"Hopefully this will give us a break," Miller said. "At least for a while. 'God bless us every one,' as the holiday season saying goes. Get Tiny Tim and his crutch. Circle the Christmas goose."