South African track star Oscar Pistorius has been set free on bail after a four-day hearing took evidence of how he killed his girlfriend.

Pistorius, known as the Blade Runner, was charged with murder after he allegedly shot model Reeva Steenkamp three times through the toilet door of his luxury Pretoria home last week.

There were cheers in court as the decision was handed down, although the athlete appeared unmoved when the decision was read.

Less than an hour later, Pistorius left the court compound in a car with tinted windows, pursued by members of the media on motorcycles.

He travelled to his uncle Arnold's home, where at least five private security guards stood outside the concrete walls, keeping reporters at bay.

Magistrate Desmond Nair, in a ruling that took nearly two hours to hand down, discussed the history of granting bail in South Africa and the benefits of doing so in order to not add to overcrowding in the nation's prisons.

He rehashed the prosecution and defence arguments but said it was not up to him to determine if Pistorius was guilty of premeditated murder.

He said the defence had shown the state's case to be weak, which amounts to an exceptional circumstance that could lead to the granting of bail.

Justice Nair was scathing of lead witness Hilton Botha, who has been dumped from the case after it was revealed he had been charged with seven counts of attempted murder.

Justice Nair said Botha "blundered" when he said he had found testosterone in Pistorius's home.

He said Botha's perception of distance was "astounding" when he changed his evidence to say that a witness, who claims to have heard shouting on the night of Ms Steenkamp's death, was 300 metres not 600 metres away.

Pistorius fronts court and the media as he awaits the fate of his bail hearing. ( Reuters: Mike Hutchings )

But Justice Nair said Botha's credibility does not undermine the state's case.

He went on to say that there were improbabilities in Pistorius's version of events that will need to be explored.

Justice Nair said he had difficulty in understanding why Pistorius did not ascertain the whereabouts of his girlfriend before he fired at the toilet door.

But in making his ruling, Justice Nair said he did not find that it had been established that Pistorius would be a flight risk.

He acknowledged past instances of aggression by Pistorius, but Justice Nair said one needed to differentiate between cases and actual charges.

"The issue is not guilt, but where the interests of justice lie," he said.

Justice Nair set Pistorius's bail at 1 million rand ($109,000) in cash and guarantees.

He ordered the athlete to avoid his home and witnesses in the case, and surrender his passport and any firearms he owns.

Pistorius has been banned from drinking alcohol and has also been ordered to report to the local police station twice a week.

The case has now been postponed until June 4.

Pistorius emotional

Pistorius says he is mortified by the death of Ms Steenkamp.

Earlier in court, the Olympian sobbed as his defence team described to the court his frantic efforts so save Ms Steenkamp after he realised he had shot her and not an intruder.

Defence lawyer Barry Roux rejected the prosecutions claims Pistorius would be a flight risk, saying that every time he goes through airport security he causes a commotion.

Mr Roux said Pistorius's prosthetic legs needed constant maintenance and he needs regular medical attention.

But in their closing arguments, prosecutors argued that Pistorius's version of events from the night Ms Steenkamp was killed is a stretch to believe.

Prosecutor Gerrie Nel said the degree of violence present in the case is horrific.

The case has captivated South Africa and the rest of the world and Mr Nel said South Africa's minister for women and children was in court for the first day of the bail hearing. He said that highlights how serious the case is for the government.

Mr Nel said Pistorius must explain that if he was so paranoid about intruders, why he slept with windows open and his front door unlocked.

The prosecution argued that Pistorius would be a flight risk if granted bail.

Mr Nel said despite his high profile, it would be possible for Pistorius to flee the country, citing the case of WikiLeaks founder Julian Assange who skipped bail and is taking refuge in the Ecuadorian embassy in London.

Detective dumped

Hilton Botha has been charged with seven counts of attempted murder. ( AFP: Stephane de Sakutin )

The hearing was rocked yesterday when Botha, the prosecution's lead witness, was dumped from the case after it was revealed he and another officer allegedly shot at a fleeing minivan in a drunken incident in 2009.

The revelations disrupted the prosecution's efforts against Pistorius and police say they will now need to muster a new team to continue the case.

Under questioning from Pistorius's lawyers earlier in the week, Botha was forced to admit to failings in the investigation into Ms Steenkamp's death.

He also admitted evidence at the scene was "consistent" with Pistorius's claim that he mistook Ms Steenkamp for an intruder when he shot her.

As well as the Botha drama, yesterday's bail hearing was beset by delays, impromptu interruptions, including one from a woman who called for Pistorius's mental state to be evaluated, and a sudden but brief adjournment called by the magistrate saying: "There appears to be a threat of some kind."

Pistorius, who has at times been inconsolable in court, claims to be absolutely "mortified" by the death of Ms Steenkamp, who he says he was deeply in love with.