Great Train Robber Ronnie Biggs has been granted release from his prison sentence on compassionate grounds, Justice Secretary Jack Straw has said.
Biggs, 79, is severely ill in hospital with pneumonia and doctors have said there is "not much hope" for him.
Mr Straw said the decision had been based on medical evidence that Biggs's condition had deteriorated and he was not expected to recover.
Biggs's son Michael told the BBC he was "absolutely delighted" by the news.
The 79-year-old was refused parole by Mr Straw last month.
He rejected a recommendation by the Parole Board which said the risk Biggs posed was "manageable".
Lawyer for Biggs, Giovanni Di Stefano, described his release as a victory for common sense.
The inmate of Norwich Prison, who was serving a 30-year sentence, was taken to the Norfolk and Norwich University Hospital in June suffering from a chest infection and was readmitted on Tuesday.
Mr Straw said: "The medical evidence clearly shows that Mr Biggs is very ill and that his condition has deteriorated recently, culminating in his readmission to hospital.
"His condition is not expected to improve.
"It is for that reason that I am granting Mr Biggs compassionate release on medical grounds.
"I have therefore been satisfied that the relevant conditions have been met, which I was not in respect of the recommendation for parole."
Biggs's son Michael said: "Finally common sense has prevailed, you know, my father has done his time. He's absolutely no threat to society whatsoever.
"My father is completely incapable of re-offending.
"He has rehabilitated himself inside and outside of prison. All I can say is we are extremely happy at the moment.
"I'm just very hopeful that my father can have another few months ahead of him in his life, or a few weeks, or whatever God decides to give him, so he can have a little bit of quality time with the family and die with some dignity."
The judicial review of Mr Straw's decision to reject the Parole Board's recommendation will now be dropped, Mr Di Stefano said.
The decision means Biggs will spend his birthday as a free man, although his condition means he will be unable to celebrate his release.
After a series of strokes, Biggs is bedridden, fed through a tube and barely able to communicate.
The three Prison Service staff watching him will be withdrawn on Friday, once the licence for his release is finalised.
If his condition were to improve, Biggs would be transferred to a nursing home in Barnet, north London, near his son's home.
Harry Fletcher, of the probation officers union Napo, welcomed the decision, but added: "It's just a great shame he wasn't released two months ago on the recommendation of the Parole Board.
"His medical condition was pretty desperate two months ago - he couldn't walk, he could barely talk and he posed no risk to anybody."
However, the train drivers union Aslef criticised the decision to release Biggs.
General secretary Keith Norman said: "It's ludicrous that a man who was part of a gang that committed a violent crime and attacked an innocent man and hit him with an iron bar should be a person who deserves clemency."
Biggs, from Lambeth, south London, was a member of a 15-strong gang which attacked the Glasgow to London mail train at Ledburn, Buckinghamshire, in August 1963, and made off with £2.6m in used banknotes.
The train's driver Jack Mills suffered head injuries during the robbery.
Biggs was given a 30-year sentence, but after 15 months he escaped from Wandsworth prison in south west London by climbing a 30ft wall and fleeing in a furniture van.
He was on the run for more than 30 years, living in Australia and Brazil, before returning to the UK voluntarily in 2001 in search of medical treatment.
He was sent to Belmarsh high-security prison on his return before being moved to a specialist medical unit at Norwich prison.
A Ministry of Justice spokesman says Biggs's licence conditions had to be officially signed-off before he is officially "released". That is expected to happen some time on Friday morning.