Paralympic icon Oscar Pistorius was granted bail by a South African magistrate on Friday, pending a high-profile trial for killing his girlfriend Reeva Steenkamp.
Pretoria magistrate Desmond Nair ruled Pistorius was not a flight risk and does not pose a danger to society after an emotionally charged four-day bail hearing.
"I come to the conclusion that the accused has made a case to be released on bail," Nair said to cries of "yes!" from Pistorius's family and supporters.
"The issue is not guilt, but where the interests of justice lie," Nair said.
As the lengthy ruling was read the 26-year-old stood in the dock weeping and quivering.
The athlete was escorted to the holding area sobbing uncontrollably. He is expected to be released later Friday.
Bail was set at one million rand ($112,770) by the magistrate on Friday. Pistorius will also have to surrender his passport, firearms and report to Pretoria's Brooklyn police between 7:00 am and 1:00 pm on Monday and Friday.
His arrest on February 14 shocked the world and gripped South Africa, where he is still considered a national hero after becoming the first double amputee to compete in the Olympics.
Pistorius has since spent more than a week at a Pretoria police station charged with the premeditated Valentine's Day killing of Steenkamp, a model and law graduate.
If found guilty he faces a possible life sentence.
He denies the charge, saying that he shot 29-year-old Steenkamp repeatedly through a locked bathroom door in the dead of night by accident, having mistaken her for a burglar.
Steenkamp was found by medics in the early hours of Thursday last week at Pistorius's luxury Pretoria home covered in bloodied towels, with bullet wounds to her head, elbow and hip. She was pronounced dead on the scene.
His family were overjoyed at the magistrate's ruling, which his lawyer praised.
"I think it's a fair decision to grant bail," said Barry Roux.
Experts said the case would now be fast-tracked through the courts.
"This is probably going to get priority and will probably take about six months to go to trial," said Stephen Tuson, a criminal law professor at the University of Witwatersrand.
"It's a high profile matter."
It was not immediately clear where Pistorius would go, but he will not return to the Pretoria estate where Steenkamp was killed.
"He doesn't want to go back to the house," said Roux.
Pistorius often cut a sorry figure sitting alone in the dock, having lost weight and often breaking into sobs.
The bail proceedings offered more than a glimmer of what is to come, with so many details about Steenkamp's last hours that it sometimes appeared to be a mini-trial.
The prosecution saw its evidence repeatedly picked apart.
Serious doubt was cast on the work of Hilton Botha, the detective who initially investigated the case.
He bumbled through testimony, admitted he may have contaminated the crime scene and appeared to undermine the police's own witnesses.
Botha himself was forced to admit that Pistorius's claims were "consistent" with the crime scene and that his police work was not adequate.
"I'm sure it could have been handled better," he told the court.
The magistrate agreed, saying the detective blundered.
"Botha indeed made several errors and concessions during cross-examination."
In a dramatic twist South African police unceremoniously turfed Botha off the case after it emerged he faces seven attempted murder charges for having opened fire on a minibus in 2011.
The prosecution will now have a few short months to regroup and try and put the case back on track.
Embarrassed by proceedings that sometimes seemed to put the South African authorities in the dock, the country's most senior detective Lieutenant General Vineshkumar Moonoo will now lead the case.
But the prosecution will be buoyed by apparent gaps in Pistorius's account of events.
"He fired four shots, not one. He meant to kill. On his own version, he's bound to be convicted," said top prosecutor Gerrie Nel.
"He hasn't said so, but he must think that conviction is likely. He must realise that a long term of imprisonment is almost guaranteed," he told the court.
In arguing against bail, Nel said Pistorius had the money, means and motive to flee his native South Africa.
"Lots of people have escaped bail. Lots of famous people," he said.
And just hours before the magistrate's decision, Pistorius's top lawyer appeared to admit the star sprinter could be convicted on charges of homicide.
"We can never ever say that he acted in self-defence," chief defence counsel Barry Roux told the court
"He is exposed to be convicted of culpable homicide."
That charge, which entails negligence rather than murderous intent, could carry a sentence of up to 15 years in prison, or in some instances release and a warning.