Convicted sex offender Bill Cosby was ordered Friday to be fitted with a GPS monitor and undergo a violent sexual predators' assessment, allowed to leave home only for medical treatment or to meet his lawyers.
Judge Steven O'Neill signed the order, clarifying the terms of the disgraced icon's $1 million bail, one day after a Pennsylvania jury found Cosby guilty on three counts of sexual assault.
The frail, 80-year-old Cosby -- once beloved as "America's Dad" -- faces a sentence of up to 30 years for drugging and molesting Andrea Constand at his Philadelphia mansion in January 2004.
Prosecutors on Thursday demanded his bail be revoked, arguing he was a flight risk -- but an irritated O'Neill refused to "simply lock him up right now."
The judge confined Cosby to his palatial residence in Cheltenham, the same home where the actor assaulted Constand 14 years ago, and instructed probation officers to fit him with a GPS monitor.
Cosby can travel only within the greater Philadelphia area, and solely for medical treatment or to meet his legal team upon written request, O'Neill said.
The disgraced megastar's passport has already been impounded.
He must also submit to an assessment by a sexual offenders board to determine how much of a danger he poses, before being sentenced by O'Neill in 75 days' time.
His conviction ends the career of once towering figure in late 20th century American popular culture, the first black actor to grace primetime US television, hitting the big time after growing up as the son of a maid.
The veteran entertainer could have faced up to a decade in prison if found guilty of three counts of aggravated indecent assault, which allegedly took place at his Philadelphia home 13 years ago.
Announcing the decision, Pennsylvania judge Steven O'Neill reminded Mr Cosby that he remains charged and on bail, despite the mistrial.
'Blinding power of celebrity'
One of Mr Cosby's lawyers, Brian McMonagle, applauded the decision, saying: "The judge is right: justice is real."
"We came here looking for an acquittal. But like that Rolling Stone song says 'you don't always get what you want'. Sometimes you get what you need."
The district attorney who brought the charges, Kevin Steele, told reporters that the prosecution was seeking a retrial.
"We will evaluate and review our case. We will take a hard look at everything involved and then we will retry it. As I said in court, our plan is to move this case forward as soon as possible."
Media captionDistrict Attorney Kevin Steele says he will review the case and ask for a retrial
A lawyer representing many of Mr Cosby's accusers, Gloria Allred, said she was hoping the prosecution would try the case again.
"We can never underestimate the blinding power of celebrity, but justice will come."
A blow for women's rights campaigners - Aleem Maqbool, BBC News, North America correspondent
As we had become accustomed to, Bill Cosby sat in court with his head bowed and his fist resting against his chin. He showed no emotion, first as the jury announced it could not come up with a unanimous verdict, and then as the judge declared a mistrial. After more than 50 hours of deliberating, it was what most had been expecting.
The only audible gasps in court came as prosecutors immediately said they would be seeking a retrial.
But emerging from the courthouse, it was clear which side considered this a victory.
Supporters chanted and cheered on the street as Bill Cosby came out smiling and waving, yet on the steps of the building some of the many women who had accused him of assault were left looking visibly upset and emotional.
One protestor screamed in rage, saying this result had been another blow to women's rights in America.
His reputation has undoubtedly been tarnished. Many will have seen all those other women who couldn't bring their cases to trial - nearly 60 - with claims that there are many more who never spoke out because they don't want to disrupt their lives.
There's no question those stories have been read, and will have seeped into people's consciousness here in America.
In a strongly-worded statement read by an aide, Bill Cosby's wife, Camille, took aim at the prosecutor, who she called "heinously and exploitatively ambitious", and the judge who she described as "overtly arrogant".
The jury had been instructed by the judge to work into the weekend to reach a verdict, after they first revealed that they were deadlocked on the case on Thursday.
But the panel returned again on Saturday to tell the judge they were still deadlocked on all three counts.
Image copyrightREUTERSImage captionAndrea Constand (centre) was the only person to take Bill Cosby to trial over the sexual assault allegations due to the statute of limitations
Some of the many women who accused Mr Cosby of drugging and assaulting them over a 40-year time span were present in court last week awaiting the verdict.
Who said what:
The accuser, Andrea Constand, took the stand during the trial, telling the court the assault had left her feeling "humiliated" by someone she considered a friend and mentor.
At the time of the incident, she was the director of women's basketball at Temple University, where Mr Cosby was on the board of trustees.
Media captionAhead of the jury's announcement, Mr Cosby thanked the jury for their "honest work"
Ms Constand, who was then 31, said he had offered her unidentified pills one night that left unable to stop his advances.
In a 2005 disposition, Mr Cosby said he had given her the antihistamine Benedryl to relieve stress and went on to have consensual relations.
Prior to the court case, Ms Constand had been barred from sharing her story in public due to a confidential settlement reached with Mr Cosby in 2006.
When the deposition was unsealed by a federal judge two years ago, it was revealed he had previously admitted to giving young women sedatives in the past.
Mr Cosby, who faces at least four separate civil lawsuits, refused to testify at the trial.
The case is seen as the biggest US celebrity court case since the murder trial of former American football player OJ Simpson in 1995.