South African athlete Oscar Pistorius, accused of premeditated murder of his girlfriend, was on Friday granted bail, set at 1 million rand (112,000 dollars).
The case was adjourned to June 4.
After a lengthy ruling that took nearly two hours to read out in the Pretoria Magistrate's Court, judge Desmond Nair said he was not convinced Pistorius, 26, was a flight risk or would act to prejudice his trial.
"I come to the conclusion that the accused has made a case to be released on bail," Nair said, as the Pistorius family let out a sigh of relief after appearing tense for much of the court session.
The athlete, who testified that he earns about 5.6 million rand annually, would have to make the first payment of 100,000 rand to be released.
The Olympic sprinter must also surrender his passport and all firearms in his possession and was banned from consuming alcohol or drugs. He is not allowed to communicate with witnesses or visit the home where he shot and killed Reeva Steenkamp, a 29-year-old model.
"Though we are obviously relieved Oscar was granted bail, it is still a very sad time for Reeva's family and for us all," the family said through spokesman Mulligan Pearce.
"As a family we are convinced Oscar's version of that terrible night will be proved to be true."
Nair, in reading out the events of the days since the bail application hearing began on Tuesday, was critical of elements in both the defence's version of events and the prosecution's side.
He noted several times the "improbability" of some aspects of Pistorius' story, which says the athlete accidentally shot his girlfriend in the middle of the night after mistaking her for a burglar.
The prosecution had demanded the judge not grant bail, saying Pistorius intentionally killed Steenkamp.
At one point defence lawyer Barry Roux conceded that if he was prosecuting the case he would at least seek a charge of culpable homicide against Pistorius for firing his 9mm gun that night.
But Nair saved his most scathing criticism for the prosecution's main witness in the bail hearing, detective Hilton Botha, the lead investigator on the night of Steenkamp's death.
Botha, who fumbled under cross examination, admitted that he failed to investigate key issues such as cellphone usage and proximity of witnesses to the scene. He also conceded that he might have contaminated the crime scene.
It was later found that Botha himself is facing seven counts of attempted murder. He was taken off the case and replaced with Lieutenant General Venish Moonoo, who appeared in court for the first time on Friday.
"We are dealing with circumstantial evidence ... the only person who knows what happened there is the accused," said Nair, noting that it could take some time for the "pieces of the puzzle" to be fit together.
Prosecutor Gerrie Nel had devoted much time to casting a shadow of improbability over Pistorius' version of events.
In taking on the charge of premeditated murder, Nel said the killing was not necessarily planned days in advance, but rather that it was thought out in the immediate lead-up to the fatal shooting of the model, following an argument between the couple.
Pistorius, in his statement, said he thought Steenkamp was in bed when he opened fire four times at an alleged intruder in the bathroom.
The prosecution has put this into question, doubting that the athlete was not aware of his girlfriend's location when shooting through a locked door into a closed cubicle.
There is a "problem also why the accused would further venture into danger knowing full well the intruder was in the toilet leaving himself open to attack," the judge said. "What if intruder came out and was waiting for him?"
But Nair left it for the actual trial to decide whether the athlete is guilty of planned murder or was too quick to pull the trigger four times in a moment of confusion.
Pistorius has often been emotional during the hearing, sobbing at times as the shooting has been recounted, with his family - including father Henke, sister Aimmee and brother Carl - often reaching over to comfort him.