Allina Health spent more than $104 million to keep its Twin Cities hospitals open during two nursing strikes this year, according to a financial report released Monday.

The total matched the amounts that had been rumored on the picket lines, where striking nurses grumbled that all the stopgap spending could have been spent to preserve their benefits.

An Allina official on Monday called it a regrettable but necessary expenditure in the organization’s effort to hold the line against costly health insurance plans used by the nurses. The two sides reached a deal in mid-October that moves the nurses from their union health plans to Allina’s own plans in exchange for other benefit concessions from Allina..

“We look at that as an investment in securing a sustainable cost structure over the long term for our health insurance benefits,” said Allina spokesman David Kanihan. “We had hoped to avoid making this investment.”

Allina spent $20 million on more than 1,200 replacement nurses and related expenses during a seven-day strike in June, and then $84 million for the September portion of a strike that started Sept. 5 and ended Oct. 16, according to the third-quarter financial report. Strike spending in October won’t be publicly reported until Allina releases its year-end financial details for 2016.

Many of the replacement nurses came from other states and commanded premium wages, especially as the second strike dragged on, and Allina also had to train, transport and house them. As a result, Allina reported an operating loss of $13 million through the first three quarters of 2016, compared to a $102 million gain over the same time period in 2015, when there was no strike.

The health system still made money, though, thanks to a healthy stock market in early 2016 and $73 million in investment returns.

The prolonged labor dispute centered on health benefits. Hospital nurses had maintained rich health plans with low or no deductibles that Allina officials believed would be subject as of 2020 to a new federal “Cadillac” tax.

Even without the tax, Allina estimated $10 million per year in savings by switching its hospital nurses to its corporate health plans. Union negotiators resisted Allina’s demands, because the nurses felt their current health plans provided them extra protection given their high risks of on-the-job injuries and contracting illnesses.

Talks lingered over nine months and 20 sessions, until a deal was reached during all-night negotiations Oct. 10-11 brokered by Gov. Mark Dayton and Lt. Gov. Tina Smith. Nurses agreed to phase out their union health plans in exchange for Allina payments into flexible spending accounts and assurances that the benefit levels of Allina’s largest health plan wouldn’t change.

The contract affects roughly 4,800 nurses at Abbott Northwestern Hospital and the Phillips Eye Institute in Minneapolis, United Hospital in St. Paul, Mercy Hospital in Coon Rapids and Unity Hospital in Fridley. A spokesman for their union, the Minnesota Nurses Association, declined to comment Monday on Allina’s strike spending disclosures.