Sarah Hyland
Cast member Sarah Hyland poses at the premiere of "Vampire Academy" in Los Angeles, Calif., Feb. 4, 2014. REUTERS/Mario Anzuoni

Sarah Hyland, star of ABC’s comedy series, “Modern Family,” was groped by a male fan in Sydney on Thursday, Australian police confirmed, and said he was later charged for indecently assaulting a visiting celebrity.

The 23-year-old actress had been posing for pictures with fans at a party, when an unidentified man inappropriately touched her. According to reports, Hyland was completely shocked and shaken after the incident. She immediately alerted the security guards, who later called the police to the scene.

The actress left the event right after the incident but later wrote on her Twitter account explaining to fans: “Sorry to all the fans outside the #qantas event that I didn't get to say hi to but I had to leave due to an inappropriate touch of a fan.”

New South Wales state police said in a statement on Friday that the 29-year-old man had been charged with indecent assault, which carries a maximum five-year prison term. The accused was reportedly freed on bail to appear in a Sydney court on March 14.

According to media reports, Assistant Police Commissioner Mark Murdoch declined to name the accused and only confirmed the arrest, and said: “It was an isolated incident. There were some underlying issues which contributed to the incident if I can say that but as I say it's before the court and I don't want to really say too much more about that.”

Hyland’s boyfriend actor, Matt Prokop, took to Twitter to vent out his anger by writing: “To the a**hole who assaulted Sarah tonight I hope to God you don't see next week.”