The deal marks the end of a long and often bitter fight between Stockton and its biggest bond insurers since the city filed for bankruptcy last year and stunned the U.S. municipal debt market with threats of forcing losses on bondholders while leaving pension payments intact.

"Now we have deals with every bond insurer that's involved in the bankruptcy process," Stockton City Manager Bob Deis said, adding he is hopeful the city is on track to exit bankruptcy in about six months.

"We've got deals with almost everybody," Deis told Reuters, noting the city now has struck deals with all but three of its 19 major creditors.

Talks with the three will continue, Deis added.

Marc Levinson, Stockton's lawyer, also said the talks would continue. But he said the city is eager to file its plan for adjusting its debt to exit from bankruptcy and anticipates it will do so next Monday or Tuesday.

The deal with Assured follows Stockton's release last week of a draft plan for adjusting its debt that disclosed a deal with bond insurer National Public Finance Guarantee over about $45 million in outstanding lease revenue bonds for the city's arena.

Payments for the arena bonds will be cut by 3 percent. Other bonds insured by National and related to parking garages will be cut by 12 percent, while a third bond for a city building will be paid in full.

Stockton's agreement with Assured allows the bond insurer to take possession of a city building and receive revenue it generates to service about $35 million in outstanding bonds the city had sold to acquire the building.

The agreement with Assured also allows Stockton to make payments on about $120 million in outstanding pension obligation bonds until 2052 from their original 2038 term.

"The settlement includes a unique and innovative instrument that enables Assured to participate in the city's future revenue growth," the bond insurer said in a statement confirming the agreement.

The deal with Assured carries two key conditions: that the judge hearing Stockton's bankruptcy case confirm its plan to adjust its debt and that city voters approve a tax measure in November.

The measure would raise Stockton's sales tax to raise revenue to help the city bolster its finances and hire additional police officers. A top reason Stockton's city council approved a bankruptcy filing was that it feared making deeper cuts to police services amid a spike in violent crime.

Without revenue from the tax increase, Stockton would need to cut $11 million in spending, which could fall on libraries, community centers and fire houses, according to Deis.

Assured and National led efforts by Stockton's so-called capital markets creditors to block the city's bankruptcy case, contesting the city's defense of its pension spending.

The insurers wanted that spending, which is broadly of rising concern in the municipal debt market, restructured along with city debt.

With about 300,000 residents, Stockton set itself apart in bankruptcy proceedings from Detroit, which has filed the largest U.S. municipal bankruptcy, and smaller San Bernardino, California, which filed for bankruptcy last year, by insisting on defending its pension payments.

The $272 billion California Public Employees' Retirement System, the biggest U.S. public pension fund, was prepared to help the city battle its bond insurers in court.

U.S. Bankruptcy Judge Christopher Klein in April found Stockton eligible for bankruptcy protection and said the showdown the insurers sought over payments to the pension fund would have to wait until the city filed its plan for adjusting its debt to exit from bankruptcy.

The deals with Assured and National mean that fight won't take place and Stockton's pension plan remains whole. But the city will see savings on pension spending due to concessions from employee groups and changes in state law, according to Deis.

Stockton officials have defended the city's pension program as necessary for retaining and recruiting employees after slashing the city's workforce in the run-up to filing for bankruptcy while revenue was plunging due to the recession and a crash in the local housing market.

The officials have also defended pension spending by pointing to pay and benefit concessions by employees to help repair Stockton's finances and to the elimination of the city's subsidy for healthcare for about 1,100 of its retired employees.

(Reporting by Jim Christie; Editing by Eric Walsh)

By Jim Christie