The New York City government has agreed to put up $20.8 million in back pay to settle a discrimination suit filed by city-employed registered nurses and midwives who had to wait several years longer than workers in predominantly male positions to retire with full pensions.

Since 1968, the city has allowed employees who work jobs it has deemed “physically taxing” for 25 years to retire with full pensions when they turn 50.