MINNEAPOLIS (WCCO) — Starting Sunday, striking nurses at five Allina hospitals will head back to their jobs.

The majority of nurses in the Minnesota Nurses Association voted on Thursday to approve the latest contract offer, ending a nearly six-week strike.

READ MORE: MACV Working To Get Homeless Vets Back Into Homes Of Their Own

The contract approval came after a marathon 17-hour negotiating session at the governor’s residence earlier in the week.

On Sunday morning, the nurses were slated to return to Abbott Northwestern, Mercy, Phillips Eye Institute, United, and Unity.

Allina and nurses union had been working on an agreement since February. Four prior contract proposals failed.

The sticking points boiled down to work place safety and insurance.

READ MORE: Man Shot By Law Enforcement In Forest Lake Dies; BCA IDs Officers, Deputy Who Opened Fire

Nurses wanted more safety measures in place. They got that in this latest contract with 24/7 security in emergency rooms.

They also received a 2 percent raise.

As for insurance, the nurses will be phased out of their health plans by 2018, but Allina will contribute to their health reimbursement and savings accounts.

In total, around 4,000 nurses will return to work.

The union estimates about 630 crossed the picket line over the duration of the strike and roughly 200 left the Allina system completely.

MORE NEWS: Black Friday Stealing Spree: Police Say Suspects ID'd In 'Brazen Mass Thefts’ At Metro Best Buy Stores

Allina has not released an exact number on how much the 41-day strike cost, but, earlier this summer, Allina spent $20 million to cover the cost of the replacement workers in a strike that was only a week long.