Egyptian actress Rania Youssef is facing public obscenity charges after walking the red carpet of the Cairo International Film Festival in a see-through dress that revealed her legs.

Egypt is a conservative country that has a large Muslim population and Youssef’s revealing dress is a no-no. Even though it was only her legs that were revealed, it is considered obscene. Pictures of her dress were posted on social media and immediately received backlash. She is set to go on trial on January 12 after a group of lawyers complained about her dress to the chief prosecutor.

She has since taken to social media to apologize. “I probably miscalculated when I chose to wear this dress,” she wrote. “It was the first time that I wore it and I did not realize it would spark so much anger…I reaffirm my commitment to the values upon which we were raised in Egyptian society.”

If Youssef is convicted, she can face up to five years in prison.