Bill Cosby is a free man.

Hours after the Pennsylvania State Supreme Court vacated his sexual assault conviction, Cosby was freed from the Philadelphia-area jail where he had served after serving nearly three years of a three- to 10-year sentence for drugging and violating Temple University sports administrator Andrea Constand in 2004.

Cosby, 83, flashed the V-for-victory sign to a helicopter overhead as he walked into his suburban Philadelphia home. Later, Cosby thanked his supporters in a tweet.

Cosby had vowed to serve all 10 years rather than acknowledge any remorse over the 2004 encounter with accuser Andrea Constand. The two had met at Temple, where Cosby long served on the board of trustees and was a frequent celebrity visitor to campus.

Constand released a statement on social media as well.

According to Fox 43, the court agreed to review two aspects of Cosby’s case. The first involved the judge’s decision to let prosecutors call five other accusers. The other examined Cosby’s argument that he had an agreement with a former prosecutor that he’d never be charged.

Cosby, 83, had been hoping the state Supreme Court, which heard his appeal in December, would reverse his conviction in the first celebrity trial of the #MeToo era. Cosby’s lawyers say the trial was flawed because five other accusers were allowed to testify to support the sexual assault complaint filed by a former Temple University basketball team manager.

The 83-year-old Cosby, who was once beloved as “America’s Dad,” was convicted of drugging and molesting the Temple University employee at his suburban estate.

He was charged in late 2015, when a prosecutor armed with newly unsealed evidence — Cosby’s damaging deposition from her lawsuit — arrested him days before the 12-year statute of limitations expired.

The trial judge had allowed just one other accuser to testify at Cosby’s first trial, when the jury deadlocked. However, he then allowed five other accusers to testify at the retrial about their experiences with Cosby in the 1980s.

The Pennsylvania Supreme Court said that testimony tainted the trial, even though a lower appeals court had found it appropriate to show a signature pattern of drugging and molesting women.

Cosby was the first celebrity tried and convicted in the #MeToo era, so the reversal could make prosecutors wary of calling other accusers in similar cases. The law on prior bad act testimony varies by state, though, and the ruling only holds sway in Pennsylvania.

Prosecutors did not immediately say if they would appeal or seek to try Cosby for a third time.

The justices voiced concern not just about sex assault cases, but what they saw as the judiciary’s increasing tendency to allow testimony that crosses the line into character attacks. The law allows the testimony only in limited cases, including to show a crime pattern so specific it serves to identify the perpetrator.

Harvey Weinstein is sentenced to 23 years in prison

In New York, the judge presiding over last year’s trial of movie mogul Harvey Weinstein, whose case had sparked the explosion of the #MeToo movement in 2017, let four other accusers testify. Weinstein was convicted and sentenced to 23 years in prison. He is now facing separate charges in California.

In Cosby’s case, one of his appellate lawyers said prosecutors put on vague evidence about the uncharged conduct, including Cosby’s own recollections in his deposition about giving women alcohol or quaaludes before sexual encounters.

“The presumption of innocence just didn’t exist for him,” Jennifer Bonjean, the lawyer, argued to the court in December.

What You Need To Know: Bill Cosby

In May, Cosby was denied paroled after refusing to participate in sex offender programs during his nearly three years in state prison. He has long said he would resist the treatment programs and refuse to acknowledge wrongdoing even if it means serving the full 10-year sentence.

This is the first year he was eligible for parole under the three- to 10-year sentence handed down after his 2018 conviction.

Cosby spokesperson Andrew Wyatt called the parole board decision “appalling.”

Prosecutors said Cosby repeatedly used his fame and “family man” persona to manipulate young women, holding himself out as a mentor before betraying them.

Cosby, a groundbreaking Black actor who grew up in public housing in Philadelphia, made a fortune estimated at $400 million during his 50 years in the entertainment industry. His trademark clean comedy and homespun wisdom fueled popular TV shows, books and standup acts.

He fell from favor in his later years as he lectured the Black community about family values, but was attempting a comeback when he was arrested.

“There was a built-in level of trust because of his status in the entertainment industry and because he held himself out as a public moralist,” Assistant District Attorney Adrienne Jappe, of suburban Montgomery County, argued to the justices.

Cosby had invited Constand to an estate he owns in Pennsylvania the night she said he drugged and sexually assaulted her.

Constand, a former professional basketball player who worked at his alma mater, went to police a year later. The other accusers knew Cosby through the entertainment industry and did not go to police.

The Associated Press contributed to this report.