More than 1300 midwives are taking the Ministry of Health to court, saying they are fed up with broken promises to pay and support them properly.
The class action is being led by the College of Midwives and is expected to be filed in the High Court today.
It was on behalf of Lead Maternity Carers, the self-employed midwives who work in the community, providing pregnancy, birth and post-natal care for tens of thousands of women and babies every year.
The college said the midwives were not fairly paid for their work and expenses, and were not properly supported by the ministry to do their jobs.
They had to meet work-related expenses on their own, like most self-employed people, but were locked into a contract and job requirements that did not give them the freedom that self-employed people had, it said.
Chief executive Alison Eddy said over the past seven years, midwives had reached a number of settlements with the ministry over the problem.
None had been delivered on, including the last one in 2018, that was supposed to have created a new contract and fairer pay, she said.
They had been left with no choice but to sue the ministry for breach of contract.
"We've just gone down so many blind alleys and hit brick walls. Without exerting our legal rights, we will just be treated badly," she said.
Christchurch lead maternity carer Violet Clapham had signed up for the class action.
Midwives like her were only paid for the service they provided, not for any of the other costs they incurred doing their job - including time and money spent driving to see clients, she said.
They were not even funded for the medical supplies they had to buy, such as scales for weighing babies and sterile gloves, she said.
They did not get annual leave or sick pay, yet they were still contracted to provide a high amount of care - including being on call around the clock - and that gave them very little flexibility in their work.
Midwives had shown a lot of patience waiting for the problem to be sorted, but some had moved on, she said.
"That is the part that makes me the most sad because we're seeing very good midwives leaving the profession," she said.
"They're left with no choice but to accept the conditions as they are, or leave the workforce."
The midwives had no formal support structure the way that general practitioners, for example, did with Primary Health Organisations.
That meant there was no one to help provide back-up or after-hours care if a midwife or their colleague was not available.
Eddy said the college liked the model of care in place in New Zealand - where every person giving birth had access to free care for their entire pregnancy - but midwives needed to be supported properly to provide it.
When the college met Health Minister Andrew Little and Associate Health Minister Ayesha Verrall this month, they seemed genuinely shocked at the midwives' conditions, she said.
But after so many broken promises, midwives could not afford to wait any longer for action, she said.
Te Whatu Ora, the new national health body, declined to comment, as it said the matter was before the court.