Updated

Students at Sacred Heart Cathedral Preparatory in San Francisco wore ties to campus on Friday to protest the administration's decision to omit a portrait of a female student wearing a tuxedo in the school yearbook.

Jessica Urbina, a senior at the Catholic high school, had her portrait taken last fall and elected to wear the tuxedo jacket and black bow-tie made available to boys instead of the black off-the-shoulder drape offered to girls.

Principal Gary Cannon told reporters that the controversy was a good learning opportunity for students but stressed that Sacred Heart is run in accordance with Roman Catholic Church teachings.

"Straight, gay, bi, transgender, they are all welcome in Sacred Heart Cathedral and at the same time we're going to be clear in terms of being a Catholic institution and what the Catholic Church teaches on how do we live out that faith in a meaningful way," Cannon said.

School officials said Jessica violated Archdiocese of San Francisco policy because she didn't comply with the dress code required for female students in yearbook photos, KTVU.com reported.

Tommy Clifford, a student at Sacred Heart, told the station he was proud to show support for Jessica by wearing a tie to class.

“She’s a very good friend of mine,” Clifford said. “I wanted to show her my support.”

Ilona Turner, legal director of the Transgender Law Center in Oakland, said that if Sacred Heart receives state funds it could be violating a new law that prohibits schools from denying students access to sex-segregated activities and programs on the basis of their gender identity or a gender nonconforming appearance.

"This appears to be a clear case of discrimination based on gender expression and discrimination based on sex," Turner told The Associated Press. "They are saying that boys can wear a tuxedo in their photos and girls cannot."

The exclusion of Jessica's portrait also could violate Title IX, the federal law that bans gender discrimination at schools, she said.

"It's hard to imagine what policy reason they would have for forcing a student to wear clothing they are uncomfortable with," Turner said. "It seems very, very far removed from any possible arguments around religious tenets related to sexuality."

Cannon was scheduled to meet with Jessica and her older brother on Friday afternoon to discuss what she will wear at graduation, according to KTVU.com.

In a statement released to the station, the school said it would work to change the policy in the future.

"As we prepare to pass out yearbooks, it is always regretful when a student portrait is omitted for any reason. As a community we will continue to work tirelessly to ensure that all students are included in the future," the statement read.

The Associated Press contributed to this report.

Click here for more from KTVU.com.