A Montgomery County jury convicted Bill Cosby of three counts of aggravated indecent assault Thursday. Here's what could happen next:

Will Cosby go to prison?

Cosby walked out of court without a change in his bail Thursday, but Judge Steven T. O'Neill ordered him to remain at his home in Cheltenham Township.

"With his age, his medical condition, I'm not going to simply lock him up right now because of this," O'Neill said.

Then the judge spoke sternly to the 80-year-old defendant, forbidding him from traveling to his other homes in New York, Massachusetts, or Los Angeles without first having another court hearing and agreeing to electronic monitoring.

"You are not to leave this commonwealth, you are not to leave this county," O'Neill said. (The entertainer had surrendered his passport when he was charged in December 2015.)

O'Neill will sentence him at a date that has not been scheduled. But it remains unclear if he will go right to prison. Defendants are sometimes permitted to remain free on bail as they appeal convictions — and Cosby's lawyer signaled his plans to file an appeal.

How long could his sentence be?

Cosby faces a maximum sentence of 10 years in prison for each of three counts related to the drugging and sexual assault of Andrea Constand. But judges typically consider other factors in fashioning a sentence, including a defendant's past history and, at times, their health. Cosby's lawyers say he is legally blind; he carries a cane and does not walk without holding the arm of his publicist or another person.

Montgomery County District Attorney Kevin R. Steele declined to say Thursday what sentence he will seek for the entertainer, but said Cosby "may be facing years in prison."

Cosby must undergo a presentencing investigation as well as an assessment to determine whether he should be registered as a "sexually violent predator," a special classification under Pennsylvania law.

Will he face any other repercussions?

Steele said he hopes to have Cosby pay for the cost of both of his trials in Montgomery County.

"We'll be arguing that the cost associated with both the trials, the sequestration, the sheriff's cost for this will go to the defendant," Steele said. "And I will be relying on defense counsel's opening remarks on this when he was talking about $3.83 million [the civil settlement] being a paltry sum or simply a nuisance."

Cosby's first trial, which ended with a hung jury last June, cost the county more than $219,000.

What about his other legal battles?

In addition to the criminal case, Cosby is still entangled in civil claims related to allegations of sexual assault. Some of his accusers have sued him in California and Massachusetts for defamation.