OLYMPIA, Wash. -- The Washington Legislature has given final approval to a measure that guarantees that nurses and other hospital staff will get regular rest and meal breaks.

A negotiated compromise between the House and Senate was voted on Wednesday and now heads to Gov. Jay Inslee.

The issue received national attention in the past week when Republican Sen. Maureen Walsh of Walla Walla suggested nurses in small hospitals with relatively few patients don't need mandated breaks because their schedules are such that they probably spend part of their shift playing cards.

Nurses responded with tens of thousands of emails and 1,700 decks of playing cards. Walsh apologized, saying she was tired and misspoke, but said she was still opposed to the bill.

The bill says hospitals must provide time in their scheduling for meal and rest breaks, with exceptions for unforeseen or unavoidable emergencies. If a break is interrupted for one of those conditions, the worker must be given an uninterrupted break later. The bill also has new requirements for paying overtime.

Hospitals have objected, saying such a requirement would cost them too much money to hire extra staff to fill high-skilled medical positions during the mandated breaks.

In the negotiated settlement, the small hospitals with fewer than 25 beds will be subject to the break requirements but get an extra two years — until July 1, 2021 — before the law applies to them.