Lawyers for the woman, who cannot be named, yesterday failed at the High Court to overturn a decision to bar her from the mother and baby unit at Holloway prison, north London.
But after a further application last night to the Court of Appeal, three judges said the child should not be taken from her mother until they hear the appeal in full.
The 24-year-old woman gave birth at the Whittington hospital in London at 6pm yesterday hours after lawyers at the High Court argued she had been unfairly denied a place in the baby unit at Holloway. The refusal meant the child would be taken from her and would probably be fostered.
Mr Justice Laws decided that Mike Sheldrick, the governor of Holloway, had not acted unreasonably in accepting a panel's recommendation that the woman be refused a place. But the case will now go to the Appeal Court on Friday.
The woman, a psychology student, discovered she was pregnant after being convicted in February this year of wounding with intent and sentenced to five years. Tests in the womb have shown the child has a chromosomal abnormality.
She applied for a place in Holloway's mother and baby unit. But the court heard that the unit's admission board believed her "unpredictable behaviour could have put other babies in the unit at risk". She had been in trouble in prison for violence and for her attitude towards staff, the governor said.
But Leon Daniel, for the woman, said some of the incidents of alleged trouble were disputed and the board had heard from no witnesses.
Frances Crook, director of the Howard League for Penal Reform, condemned the practice of separating mothers and babies and said prisons should be able to deal with such women even if they were difficult.
"A substantial issue about the welfare of the baby wasn't dealt with by the court. Issues of detail and trivia seem to have dominated the discussion." Nobody would benefit from the damage caused to the baby by separating it from its mother, she said.
Supporters of the woman had feared that she could spend as little as a day with the baby because of the staffing implications of her continued stay in a public hospital where two prison officers need to be with her at all times.Reuse content