Pretoria magistrate Desmond Nair ruled Pistorius was not a flight risk and did 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 in court.
Pistorius later left the magistrate's court a free man, in a silver sports utility vehicle flanked by photographers and cameramen on motorbikes.
It was a first victory in what is expected to be a long legal battle with the state, which accuses Pistorius of premeditated murder.
Bail was set at one million rand ($112,770) and Pistorius will 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.
As the lengthy ruling was read, the 26-year-old stood in the dock weeping and quivering as his family looked on, riven with tension.
Relatives welcomed the decision.
"We are relieved by the fact that Oscar got bail today, but at the same time, we are in mourning for Reeva Steenkamp and her family," said the athlete's uncle and family spokesman Arnold Pistorius.
"As a family, we know Oscars version of what happened that night, and we know that it is the truth that will prevail in the coming court case."
Following the magistrate's decision, Pistorius was escorted to the holding area sobbing uncontrollably, as his brother Carl hugged sister Aimee and the broader family huddled in prayer.
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 his attorney Barry Roux.
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 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's housemate Kim Myers greeted the decision with calm restraint.
"This is just a bail application. This is not a trial. We trust and hope that justice will prevail," she said.
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.
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 trial in miniature.
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.
Despite the victory, Pistorius may have a tough task to avoid jail time.
Just hours before the magistrate's decision, his 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," 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.
The prosecution will also take some solace from apparent gaps in Pistorius's account of events.
"It cannot be said that warrant officer Hilton Botha is the state's case," Prosecutor Gerrie Nair insisted.
"It's his evidence that may have been tarnished by cross-examination, not the state case."
Medupe Simasiku a spokesman for the National Prosecution Authority said the state would push forth with the case.
"The prosecution will respect the judgement of the ruling of the court in terms of bail application. We would like to assure everyone that we are still confident in this case."
Nel summed up the state's case during the bail hearing.
"He fired four shots, not one. He meant to kill. On his own version, he's bound to be convicted," he said.
He added that Pistorius "must realise that a long term of imprisonment is almost guaranteed."
Pistorius is due back in court on June 4 for a procedural preliminary appearance.