Pistorius is charged with one count of premeditated murder. But the double-amputee Olympian says he shot his 29-year-old girlfriend by accident, thinking someone broke into his home.
Cameras flashed as Pistorius entered the courtroom. The athlete was facing the possibility of months in custody while he awaited trial the murder charge.
Chief Magistrate Desmond Nair made his decision after a near two-hour explanation of his ruling. The magistrate pointed out that there were inconsistencies in Pistorius' story, but also in the facts gathered by investigators. He set the bail at 1 million rand, which amounts to $113,000, but he only has to put up about $11,000 in cash.
The magistrate said Pistorius must hand over his passports and also turn in any other guns that he owns. Pistorius also cannot leave the district of Pretoria without the permission of his probation officer.
The athlete has been in custody since his arrest. The shooting happened on Valentine's Day at his home in a gated community in South Africa's capital, Pretoria.
Pistorius testified that he and Steenkamp had gone to sleep and he woke up in the middle of the night thinking someone was hiding in his restroom. He said he grabbed his 9 mm pistol and fired into the door of a toilet enclosed in the bathroom, only to discover later to his horror that Steenkamp was in there.
Witnesses have told authorities that they heard shouting coming from the home before the shooting.
The question for the judge was whether or not Pistorius was a flight risk. The defense had argued that because of his fame and his disability, Pistorius would not be able to flee the country. Prosecutors maintained he should be treated just like everyone else.
Experts say Pistorius won more than his freedom with the hearing. The decision to grant bail bolsters his chances with a jury.
"This is a huge victory for Pistorius, let's be clear," said ABC News legal expert Dan Abrams. "When you are charged with premeditated murder, you are generally held without bail."
Still, prosecutors maintain they have strong evidence, and the case they will present is solid.
"We still have a case in front of us. This was just a bail application. It doesn't mean acquittal," said prosecution spokesman Medupe Simasiku.
Pistorius, known as the "Blade Runner," made history in the Olympics last year in London, becoming the first double-amputee to compete in a track event. Steenkamp was a model and an aspiring TV star.
The Associated Press contributed to this report.