Maternity services across Britain could reach "crisis point" in the next few years as swathes of staff begin their retirement, experts have warned.
A new report from the Royal College of Midwives (RCM) has highlighted that more than a third of British midwives are nearing retirement age.
More student midwives need to be trained and start work in the NHS as a "matter of urgency", the RCM's State of Maternity Services report says.
It adds that if nothing is done, new midwives will not have the "experience and confidence" they need before older members of staff retire.
In England, 33% of midwives are in their 50s or 60s. This compares to 35% in Wales and 40% in Northern Ireland.
Across Scotland, 41% of midwives and maternity care assistants are aged 50 or older.
"Large sections of the midwifery workforce in each part of the UK is fast approaching retirement age," the report authors wrote.
"We need to train and employ enough midwives before that happens if we are to avoid a crisis within the next few years.
"We need action now, before it is too late to do anything in time."
The report also highlights other issues affecting the workforce including the ageing mothers - with more and more women over the age of 30 giving birth - and a rising number of obese patients.
The RCM estimates that across England there is currently a shortage of 3,500 midwives.
It said that despite this shortage, in the 12 months to September 2016, the NHS midwifery workforce in England rose by just 104.
"At this rate, the midwifery workforce of an average maternity unit is growing at the pitiful rate of around one extra midwife every two years," the report states.
It adds: "The midwifery profession is ageing fast, just as the demands on it are growing.
"We are standing on a cliff edge and need swift action now."
Commenting on the report, Cathy Warwick, chief executive at the RCM, said; "One of the benefits of publishing this RCM report annually is it allows us to look deeply into emerging issues and reoccurring trends that impact our maternity services, affecting women, their babies and the midwives who care for them.
"Unfortunately, again this year one of the top reoccurring issues across the UK is our ageing midwifery workforce.
"The RCM remains most concerned that there are not enough newly qualified midwives coming in to staff an already understaffed maternity service.
"Right across the UK, we are not seeing enough midwives being taken on.
"Older midwives will be lost to retirement soon and with this we lose their experience and their ability to train and guide younger midwives.
"This situation cannot be ignored any longer, if we wait, there will not be enough time for us to train new midwives and get them into the service.
"In England the removal of the student bursary is already having an impact on recruitment as we saw last week with the drastic fall in Ucas applications for both midwifery and nursing degrees.
"Also, the working rights of EU nationals to remain working in the UK post-Brexit must be confirmed quickly.
"With 1,300 midwives working in the NHS in England alone, the national shortage of midwives could be well over 4,500, if not close to 5,000, without them."
The Royal College of Paediatrics and Child Health raised concerns about the number of obese mothers highlighted in the report.
The document says that rates of obesity among pregnant women "contribute to demands on the service".
It says that in England and Scotland over one in five pregnant women - 21% and 22% respectively - are obese.
College president Professor Neena Modi said: "This report confirms our worries about the health of women and their babies.
"Over one in five pregnant women are obese, and this poses a risk not only to their own health but also to their children, placing them at greater likelihood of being stillborn, or developing obesity, diabetes, and heart disease.
"A child's health begins in the womb, and being born to an obese mother means that he or she is already on a path to ill health.
"It is really important that women who plan to become pregnant one day safeguard their own health, and realise that this is something very precious they can bequeath to their baby.
"Women and their partners require information and education about the dangers of obesity.
"This is also why personal, health, and social education for young people is so important, as well as access to services to support them."
Health minister Philip Dunne said: "Patients should be reassured that we are actively ensuring we continue to have enough midwives in the NHS - already there are over 2,100 more since 2010, with 6,300 more in training.
"The way we model midwife training places actually takes into account projected retirement rates.
"We have also invested millions of pounds in staff training and new equipment to help the NHS become one of the safest places in the world to have a baby."