Credit: Matt Rourke/AP

Bill Cosby was arraigned in a Pennsylvania court Wednesday on a charge of aggregated sexual assault in connection with an alleged incident at his home in 2004.

Bail was set at $1 million for Cosby, who will remain free pending trial. Just hours before, prosecutors in Pennsylvania announced they were charging the comedian for an assault that allegedly involved Andrea Constand at his Elkins Park mansion. Constand, a former employee of Temple University, considered Cosby a mentor, prosecutors claimed.

Cosby, who arrived at the court wearing a knit hoodie, was quickly escorted out of court amid a gantlet of photojournalists. He reportedly agreed in court to have no contact with his accuser.

The Associated Press reports that Cosby, who turned in his passport, will be fingerprinted at a police station near the Elkins Park courtroom. His next court hearing is Jan. 14.

Shortly after the arraignment, attorney Gloria Allred — who represents some of the Cosby accusers — admitted during a press conference that the announcement by the Pennsylvania court took her by surprise.

“I had no idea this was going to happen,” Allred said. “I was stunned that it happened this morning. … It will be the highest profile criminal case, at least involving a celebrity, in this country. I am glad this day has come.”

More than 50 women have accused the comedian of drugging and/or sexual assault, but Cosby has denied all of the allegations, and two weeks ago, he filed a defamation lawsuit against seven of his accusers. This is the first time he has been charged with a crime.