JOHANNESBURG, South Africa -- Oscar Pistorius was granted bail and will be allowed to return home while awaiting trial in the shooting death of his girlfriend, a magistrate ruled Friday.

Pistorius, an Olympic and Paralympic track star, is charged with premeditated murder in the death of Reeva Steenkamp.

In a decision that took nearly two hours for him to explain, magistrate Desmond Nair said Pistorius is not a flight risk and does not show "a propensity for violence" or constitute a risk to the community.

"The issue is not guilt but whether the interests of justice (are served) in relation to bail," Nair said. "I am not seized with finding beyond reasonable doubt whether he committed premeditated murder...At this stage, I have to examine the facts the state has presented - all the state has right now is circumstantial evidence."

Before issuing the ruling, Nair read a full recap of statements and evidence in the hearing. He detailed how friends of Pistorius had noted that the couple "hit it off" and "were very much in love." Pistorius sobbed through parts of the hearing.

The defense had to show that "exceptional circumstances" existed for Pistorius to be granted bail.

Police say Pistorius, 26, shot and killed Steenkamp in his bathroom where she was hiding after an argument on Valentine's Day. He says he accidentally shot Steenkamp because he thought she was an intruder.

Prosecutors argued before Nair's ruling that Pistorius is a flight risk.

"(Pistorius) is treating it as, 'Let me go, let me carry on my business as usual," prosecutor Gerrie Nel said. "But it can't be business as usual."

But Pistorius, a double amputee, isn't a flight risk because his prosthetic legs "need maintenance and adjustment on a monthly basis," defense lawyer Barry Roux said.

In his ruling, Nair detailed Pistorius' assets in South Africa and also the athlete's strong ties of family and friends in the country.

Legal experts say the trial is at least months away. When the case goes to trial, a judge will decide Pistorius' fate. There are no jury trials in criminal cases in South Africa.

Roux introduced culpable homocide as a possible charge for Pistorius.

"He did not want to kill Reeva. He had no intent to kill Reeva," Roux said.

The fourth day in court was more subdued than earlier in the week when the hearing resembled a full-blown trial with detailed arguments and evidence presented by both sides.

Pistorius' case took a dramatic turn Thursday as police announced that lead investigator Hilton Botha has been replaced. Botha, who testified earlier in the week, faces attempted murder charges from a 2011 case. The charges stem from an incident in which Botha and two other police officers allegedly shot at a minibus they were trying to stop.

The charges revealed against Botha had originally been dropped in March 2012 but were reinstated Feb. 4. Nel said he learned about the charges Wednesday.

The decision to remove Botha from the case came a day after the detective appeared to damage the prosecution's case against Pistorius. Botha testified that police have found nothing inconsistent with Pistorius' account of the events that led to Steenkamp's death.

Earlier in the hearing, Botha said needles and testosterone were found in Pistorius' bedroom. The defense said the substance was herbal. A spokesman for South Africa's National Prosecution Agency said the substance is still being tested.

In spite of the prosecution's missteps, many South Africans, riveted by the case, are more convinced of Pistorius' guilt than his story.

"All his stories sound like lies," said Ryan George, 28, of Johannesburg, before the magistrate's ruling was announced.

Others said Pistorius, a national hero in South Africa, assumes that his celebrity status affords him special protection and that he will probably get away with murder.

"No doubt that he wanted to kill her," said Andre Van Biljoen, 54, of Johannesburg. "If you look at his attitude at the Paralympics, you can see this guy is a narcissist."