A Philippines judge has ruled that a Catholic school must back down from its decision to ban a teenage girl from her own graduation ceremony after it discovered "immoral" photos on her Facebook page.

St. Theresa’s College High School (STC) in Cebu City banned the teen from attending the ceremony after she uploaded a photo to Facebook showing her wearing a bikini and holding a cigarette and liquor bottle.

It turns out she wasn’t the only one. The school banned four other girls from graduation for posting similar bikini pics to Facebook. After the students and their families executed an affidavit against the school, a judge issued a restraining order against STC.

Judge Wilfredo Navarro said the decision to ban the girls from Friday’s graduation ceremony was un-Christian and unlawful, according to the Associated Press. The order ensures all five girls will attend the ceremony, though the school asked the court to reconsider on Friday morning.

Lawyer Cornelio Mercado said photos showed the other four girls wearing bikinis at a beach party earlier this year. On March 1, all five attended a meeting with school officials, who called the teens "sluts" over their Facebook pictures, according to the AP.

The lawyer claimed the school officials obtained the photos illicitly, since they were not Facebook friends of the girls and should not have had access to them.

Judge Navarro slammed the school for calling the girls names such as "disgusting," "cheap" and "drunkards," adding that the teens had gone through a “psychologically and emotionally devastating experience.”

Meanwhile, Mercado said the families will file charges against the school and the officials, citing child abuse and "grave oral defamation."

Photo by R. Fazio