Oscar Pistorius is pictured through a car window as he leaves court after he was granted bail on Friday. Photograph: Siphiwe Sibeko/Reuters

When the long-awaited decision came, the only man in the packed courtroom who did not seem seized by the moment was Oscar Pistorius himself.

His family members smiled and joined in a circle of prayer. His friends leaped to their feet, punched the air and shouted "Yes!" Journalists thronging the court eagerly shared the news on Twitter.

But at the centre of it all, Pistorius remained utterly isolated, plunged into a seemingly bottomless pit of despair. There was little sign of joy on the face of the London Olympic and Paralympic star, who had spent most of the day with jaw clenched, swallowing hard or sobbing softly.

"I come to the conclusion that the accused has made a case to be released on bail," magistrate Desmond Nair said at the end of a near two-hour summing up, praising Pistorius for having offered a detailed affidavit which "reached out to meet the state's case".

The court set bail at 1m rand (£73,000) and postponed the case until 4 June, leaving Pistorius's life and career in an agonising limbo. The 26-year-old left the courthouse in a silver Land Rover, sitting in the rear, tailed by a motorcycle with a TV cameraman aboard. A media bidding war for the first interview is predicted.

His lawyer, Kenny Oldwage, said that after his release from custody, Pistorius "will be in a residence we've provided in Pretoria". The star's coach, Ampie Louw, was quoted saying he is considering putting the athlete back in training "to get his mind clear".

Pistorius has been ordered to hand over firearms and passports, avoid his home and all witnesses in the case, report to a police station twice a week, and not to drink alcohol. He is not permitted to enter any international airport departure hall.

The magistrate's decision came after four days of twists and turns in a case that has gripped the world. Pistorius admitted shooting dead his girlfriend Reeva Steenkamp at his luxury home near Pretoria on 14 February, but claimed he thought she was a burglar. The prosecution insist it was premeditated murder while the defence argue culpable homicide.

After the steel gate clanked open allowing Pistorius into the dock on Friday, he stood still with eyes closed, head bowed, apparently in prayer as cameras clicked and flashed around him. Nair complained that such spectacles made Pistorius look like "some kind of species the world has never seen before".

The magistrate admitted he was in an "unenviable position" in deciding bail. The case has polarised South Africans with either result bound to be controversial. Nair made clear that bail was not a matter of guilt and innocence but determining whether justice would be served by holding a defendant in custody.

As Nair ran through Pistorius's version of events, the athlete lost the battle with his emotions and wept silently, his hands trembling, at the words: "She died in his arms".

Dissecting the prosecution case, Nair said Hilton Botha, the detective leading the investigation, had made "several errors and concessions" during cross-examination.

Nair said the officer had not asked for all the mobile phones, may have contaminated the crime scene, "blundered" on the description of substances found at the property, and did not spend as long as he ought to have if he wanted to establish that the athlete had a propensity to violence.

Botha was replaced as lead investigator on Thursday after he was charged with multiple counts of attempted murder for shooting at a minibus. Police say he has been replaced by South Africa's "top detective".

In a sign that the trial could be very different, Nair cautioned: "It can never be said that warrant officer Hilton Botha is the state case. The state case will be put together by experts."

Nair said there were several grounds on which bail can be denied, one of which is whether the defendant is prone to violence. He said this had not been proven despite reference to an incident in which Pistorius allegedly threatened to break a man's legs.

Another is if the defendant poses a flight risk, an issue which brought the Blade Runner's disability and hi-tech artificial legs into the spotlight. Prosecutor Gerrie Nel said Pistorius has the "money, means and motive" to flee if given bail, and described how WikiLeaks founder Julian Assange is just as well known but skipped bail by seeking refuge in the Ecuadorean embassy.

But Nair asked: "What kind of life would he lead, a person who has to use prostheses, if he has to flee" and is "ducking and diving every day" on artificial legs. "His international career would be over in any event."

"A life not in prison," Nel replied simply.

Defence advocate Barry Roux contended: "Mr Pistorius, every time he goes through security at airport, there's commotion … He cannot go unnoticed through airport security … He can never go anywhere unnoticed."

He added: "Those legs need maintenance and adjustment on a monthly basis." Pistorius also requires medical attention for his stumps, he said.

Nair concluded: "I cannot find it has been established that the accused is a flight risk."

Earlier the prosecution had attacked Pistorius's character and portrayed him as a cold-blooded killer. Nel said mockingly: "I shoot and I think my career is over and I cry. I come to court and I cry because I feel sorry for myself."

He continued: "I am not saying the planning of the murder of Reeva Steenkamp happened weeks ahead, days ahead. I am saying the planning to kill Reeva Steenkamp happened that night."

He added: "You cannot put yourself in the deceased's position. It must have been terrifying. It was not one shot. It was four shots … The degree of violence present in this case is horrific."

Nel also noted that the South African president Jacob Zuma had called for the law to prioritise violence against women and children. He cited the case of Anene Booysen, 17, who was gang-raped and murdered near Cape Town earlier this month.

In the absence of witnesses to the Pistorius shooting, however, Nair found the prosecution case rested on "nothing more than circumstantial evidence".

But he also noted there were "improbabilities that need to be explored" in Pistorius's account of events: why he did not try to find his girlfriend on fearing an intruder was in the house, why he did not try to determine who was in the toilet, and why he would venture into perceived "danger" – the bathroom area – when he could have taken other steps to ensure his safety. These are likely to be probed in the trial.

None of this, however, was enough to sway the magistrate against granting bail. After the announcement, which was broadcast as live audio around the world, Pistorius's friends welcomed his release. Businessman Kenny Kunene said: "Obviously I'm excited. I've always believed in the effectiveness of the judiciary. Fortunately the courts in this country aren't swayed by emotional or political factors.

"I love Oscar, he's an ambassador for the country and he turned his disabilities into abilities. He's a national hero."

Fubes Danor, who shouted "Yes!" when the decision became clear, said: "I'm very happy. I've been hyperventilating this week. We've been friends for six years and he's a cool dude."

Meanwhile in a magazine interview a week before her death, published on Fridayyesterday, Steenkamp, a law graduate and model, spoke about her three-month-old relationship with Pistorius.

"I absolutely adore Oscar," she told Heat. "I respect and admire him so much. I don't want anything to come in the way of his career."

The bail conditions

Upon payment of the 100,000 rand (£73,000) Pistorius must be released with the following conditions:

• He appears in court on 4 June at 8.30am.

• He surrenders all passports and refrains from applying for any passports.

• He refrains from entering any airport.

• He surrenders all firearms.

• He refrains from possessing any firearms.

• He refrains from talking to any witnesses for the prosecution.

• He will have a probation officer and correctional official from the date of release until the case is concluded.

• He shall inform the official of all his movements and ask for permission for any journeys outside Pretoria.

• He shall give them a phone number and must be contactable day and night.

• He must not be charged with an offence of violence against women.

• He must not use drugs or alcohol.

• He must not return to his home and must not make contact with any residents of his estate except the Stander family.