The coroner at an inquest into the death of a prisoner found hanged in her cell days after she gave birth said the hearing had revealed "a series of very serious matters".
Michelle Barnes, 33, was serving a two-year sentence for drugs offences at Low Newton jail, Durham, when she died in December.
She had returned to the prison after the birth and the day before she died she had been told she would not be allowed back to hospital to see the baby.
Ms Barnes was challenging care proceedings brought by Cumbria County Council to have the baby, who cannot be named for legal reasons, put into foster care.
She had a history of mental health and drug problems and had self-harmed.
Durham coroner Andrew Tweddle, sitting in Crook, said: "I think this inquest has revealed a series of very serious matters which need to be considered to prevent future deaths."
A jury found that Ms Barnes deliberately hanged herself but that her intention at the time was unclear.
The panel found on the balance of probabilities, a series of factors "probably contributed" more than "minimally or trivially" to her death.
Those factors were:
:: that the prison authorities had not opened an Assesment, Care in Custody and Teamwork (ACCT) document on her at the time of her death. These are designed to help staff to support prisoners at risk of self harm.
:: that it had been decided to terminate her visits to the hospital where her baby was being kept.
:: that there had been a lack of input from the mental health team at the prison in the fortnight before she died.
Ms Barnes found out she was pregnant after she was sentenced in June last year.
The county council had concerns about her as a mother and even before the birth it began the legal process to have the baby taken into care.
Ms Barnes had a series of consultations with a solicitor to fight the proceedings, which had not been finalised at the time she died, and was on a methadone programme in prison to battle her drugs problem.
That meant the baby should receive her breast milk to help wean the infant off methadone too.
But Ms Barnes was left sobbing on her bed when two prison officers she did not know came to her cell the day before she died to tell her she was not allowed back out of prison to visit the baby.
The coroner said: "The witness made it clear she felt uncomfortable as Michelle was in front of her sobbing. If the officer delivering the bad news felt uncomfortable, I wonder what Michelle felt like, receiving that information from, to all intents and purposes, a stranger."
Mr Tweddle, who has been a coroner for 30 years, said: "I think rarely in my history have I had so many concerns on so many topics, some very important and serious indeed."
He was particularly critical of Ms Barnes's birth plan, when the prison did not even have a breast pump for her to express milk.
A key part of Ms Barnes's application to move to a prison with a mother and baby unit - one of only five in the country - was not emailed until mid December, he said.
Mr Tweddle said evidence was mixed on whether there was a possibility she would be allowed to visit the baby after she gave birth.
He accepted Ms Barnes's discharge from hospital was sooner than expected and may have caught out the prison authorities.
But speaking of the birth plan, Mr Tweddle said: "The evidence we have heard shows huge failings in that regard and therefore there is a risk of further fatalities, and therefore it is a matter that needs to be properly considered by the authorities."
He agreed substantial changes had been made at Low Newton but still wanted to make recommendations in case they had not been followed throughout the prison service.
Outside court Deborah Coles, director of the charity INQUEST, said seven women had taken their own life in prison this year.
She said: "What was Michelle Barnes, a young woman with mental health and drug problems and a history of self-harm, doing in prison at all?
"She could and should have been diverted from prison.
"At the very least, she should have had access to mental health support at a critically vulnerable time when she was facing the prospect of losing her baby."
After the inquest, Elizabeth Moody, director of nursing and governance at Tees, Esk and Wear Valleys NHS Foundation Trust, apologised.
She said: "As reported during the inquest, the care Michelle received from our team had previously been of a good standard but there were things we could have done better during the period leading up to her death and we are truly sorry for what happened.
"We acknowledge the findings of the jury and have already made a number of changes to the way we work."
A Ministry of Justice spokesman said: "This is a tragic case and our thoughts are with Michelle Barnes' family and friends.
"The safety and welfare of people within our custody is our top priority but we recognise that there were significant failings in the care of Ms Barnes.
"We will now carefully consider the findings and PPO investigation to help ensure such incidents are not repeated."