Bill Cosby mugshot
Bill Cosby poses for a mugshot photo during his arraignment on 30 December 2015 in Elkins Park, Pennsylvania Montgomery County District Attorney's Office via Getty Images

Embattled TV show star Bill Cosby was charged with three counts of aggravated indecent assault on 30 December over an alleged 2004 incident in Pennsylvania. The 78-year-old comedian, who has been an the centre of dozens of sexual assault allegations, appeared briefly in court before being released on $1m (£674,500) bail.

Cosby turned over his passport during his court appearance in Elkins Park, Pennsylvania and did not enter a plea. The judge presiding over the arraignment, District Court Judge Elizabeth McHugh, reportedly wished Cosby "good luck" before the actor was processed and had his mugshot taken by the Cheltenham Police Department.

McHugh also warned Cosby that a condition of his bail was that he should not contact the victim or her family. "If that occurs, you could be arrested," she said. Cosby told the judge he understood.

The comedian's attorney vowed to fight the charges, which arrived on the eve of the statute of limitations. "The charge by the Montgomery County District Attorney's office came as no surprise," said lawyer Monique Pressley in a statement. "Make no mistake, we intend to mount a vigorous defence against this unjustified charge and we expect that Mr Cosby will be exonerated by a court of law."

First Assistant District Attorney Kevin Steele told reporters his office had decided to proceed with the second-degree felony charge in the case involving Temple University employee Andrea Constand. "We examined all the evidence and we made this determination because it was the right thing to do," Steele said during a press conference.

Steele added that authorities decided to pursue charges against Cosby after new information was revealed in July. Over the summer, US District Judge Eduardo Robreno unsealed Cosby's deposition regarding the case. During the deposition, the comedian admitted to giving Quaaludes (which have similar effects to modern date-rape drugs) to a woman he wanted to have sex with.

Constand claimed in 2005 that Cosby had made several sexual advances at his Pennsylvania home. She claimed that in early 2004, Cosby gave her pills and wine, which made her unresponsive and unable to move, and sexually assaulted her. The two eventually settled out of court for an undisclosed amount following her allegations and the district attorney in Montgomery County at the time decided not to pursue charges.

The former university employee, who has since moved to Canada, has told authorities she is willing to cooperate, Steele said. "She's a very strong lady," Constand's attorney Dolores Troiani told reporters. "She'll do whatever they request of her."

Constand is just one of over 40 women who have accused Cosby of sexual misconduct through four decades. Attorney Gloria Allred, who represents 29 of those women, said she welcomed the charges even if the statute of limitations had expired for most of her clients. "Seeing him criminally charged and having to face a trial is the best Christmas present they have ever received," she said during a press conference. "I'm very happy this day has finally come."

If Cosby is convicted, he faces a maximum sentence of 10 years in prison and a $25,000 (£16,866) fine.