SYDNEY (AP) — Australian police have charged a man with indecently assaulting a star of the hit television comedy “Modern Family,” Sarah Hyland, in Sydney.

The cast of the ABC series arrived in Sydney this week to shoot an Australian episode.

The 23-year-old was attending a social function for cast members at a Sydney hotel on Thursday night when she was allegedly groped on the chest by a man who had asked her to pose for a photograph, The Sydney Morning Herald newspaper reported on Friday.

The actress who plays big-eyed teenager Haley Dunphy immediately alerted private security guards, who called police to the scene.

New South Wales state police said in a statement on Friday that a 29-year-old man had been charged following the alleged indecent assault.

He was charged with assault with an act of indecency, a crime that carries a potential maximum of five years in prison. He was freed on bail to appear in a Sydney court on March 14. Police have not revealed his name.

The actress was shaken by the incident, and left early from the event sponsored by Qantas Airways, the newspaper said.

“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,” she wrote on Twitter.

Copyright 2015 The Blade. All rights reserved. This material may not be copied or distributed without permission.