Jeremy Hunt was ordered to delete a "highly inappropriate" tweet during an NHS manslaughter trial, it can now be reported.
The health secretary posted a link to a news report about Frances Cappuccini, a teacher who died hours after a Caesarean birth at Tunbridge Wells Hospital in Kent.
He added the comment: "Tragic case from which huge lessons must be learned."
But he was immediately ordered to delete the tweet by a judge over fears it could have influenced the jury.
The tweet was posted on 14 January, the second day of the trial at the Inner London Crown Court. It can be reported now because the landmark case collapsed on Thursday.
Mr Justice Coulson had put a temporary ban on reporting Hunt's tweet. He told the court:
The trouble is there are no lawyers left in the House of Commons. There are no professional lawyers. It is highly inappropriate for anybody to pass comment which might be said to know the result of a trial before that result is known.
I suppose, potentially, in a very serious case, it could be regarded as a contempt of court. I would hope that everybody would know that. Sadly, these days, many people in public life don't know that.
I think it's right that there be no future comment about possible results in this case until it is known. That includes the tweet from the present health secretary that I've been shown this morning. I would direct that the tweet be taken down.
These days it is hard to have the word "tweet" without "ill-advised" before it.
The case was the first prosecution of an NHS trust for corporate manslaughter since the offence was introduced.
Cappuccini, 30, died after suffering a haemorrhage in October 2012. She lost more than two litres of blood when she gave birth to her second son Giacomo.
But the judge halted the trial against Maidstone and Tunbridge Wells NHS Trust and consultant anaesthetist Errol Cornish, who had denied manslaughter by gross negligence, saying they had no case to answer.
The Department of Health declined to comment on the judge's order but confirmed the tweet was deleted immediately.
Emily Ashton is a senior political correspondent for BuzzFeed News and is based in London.
Contact Emily Ashton at email@example.com.
Got a confidential tip? Submit it here.