Doctors are crediting public support for helping them strike a new deal on working hours.
After more than a year of negotiations, including strike action, resident doctors and District Health Boards have agreed on a change to working conditions.
The new agreement includes doctors not having to work more than 10 days in a row, and having a total of four days off in a fortnight.
They won't be rostered to work more than four 10-hour night shifts in a row, and will be given recovery time after night shifts.
A new provision will mean doctors could work back-to-back weekends, but to make up for it, rostered days off will be attached to other weekends to allow meaningful time off.