A Christian high school student in Kentucky was expelled after school administrators saw a photograph from her 15th birthday party in which she was wearing a rainbow sweater and smiling next to a rainbow birthday cake.

“She was happy. She looked beautiful,” the teen’s mom, Kimberly Alford, told NBC affiliate WAVE of Louisville. “Of course, as a mom, I took her picture blowing out her candles, and I posted that on my Facebook page.”

Alford said that shortly after she posted the photo, she received a letter from the head of Whitefield Academy, where her daughter, Kayla, was a freshman.

“The WA Administration has been made aware of a recent picture, posted on social media, which demonstrates a posture of morality and cultural acceptance contrary to that of Whitefield Academy’s beliefs,” the letter, signed Jan. 6 by the head of the school, Bruce Jacobson, said. “We made it clear that any further promotion, celebration, or any other actions and attitudes that are counter to Whitefield’s philosophy would not be tolerated. As a result, we regret to inform you that Kayla is being dismissed from the school immediately.”

While rainbows can have many meanings — in addition to being a meteorological phenomenon — they’ve served as a universal symbol of gay pride and acceptance since the late 1970s.

In a statement shared with NBC News on Wednesday, Whitefield Academy said that the rainbow-filled photo was just the last straw following two years of student code violations.

“Inaccurate media reports are circling stating that the student in question was expelled from our school solely for a social media post,” the statement said. “In the fall, we met with the student to give her a final chance to begin to adhere to our code of conduct. Unfortunately, she did not live up to the agreement, and therefore, has been expelled.”

Alford said in an interview Tuesday that her daughter had been on probation since October for “some behavioral issues,” including cutting class and being caught with an e-cigarette. She said school administrators, “in a roundabout way,” told her that the probation wasn’t about her daughter’s “sexuality.” However, Alford did say some students were uncomfortable with her daughter’s “perceived sexuality.”

The discomfort, according to Alford, led a school counselor to give her daughter the book “Gay Girl, Good God,” whose author, Jackie Hill Perry, is a formerly identified lesbian who claims God stopped her from being gay. Alford said her daughter and the counselor had been meeting weekly to go over the book before Kayla was expelled.

In its statement, the school did not address NBC News’ requests for comment about the additional circumstances of Kayla’s probation and expulsion, including the other alleged “lifestyle violations” and the counseling sessions with “Gay Girl, Good God.”

In Whitefield Academy’s student handbook, which can be found on its website, the school says a “homosexual orientation” household wouldn’t be considered “in harmony” with the school’s beliefs.

“On occasion, the atmosphere or conduct within a particular home may be counter or in opposition to the Biblical lifestyle the school teaches,” the handbook says. “This includes, but is not limited to, sexual immorality, homosexual orientation, or the inability to support Biblical standards of right and wrong.”

Alford filed an appeal with the academy, arguing that her daughter shouldn’t be “held accountable for a cake that I purchased with no intention of promoting a posture of morality and cultural acceptance that contradicts that of Whitefield Academy.” While Alford said the school refused to meet with her, she said administrators did agree to change her daughter’s expulsion to a voluntary withdrawal so it would no longer be on her record.

Alford said she’s pretty certain that Kayla misses Whitefield Academy, which she had attended since the sixth grade.

“She had some close-knit friendships with students. The parents are great,” Alford said. “I just hate that this happened. Whitefield was not all bad. I really liked it. I wanted her to graduate from there.”

Kayla started public school Friday, and her mom said “she’s adjusting” to the new atmosphere.

Asked why she decided to share her family’s story publicly, Alford said that she believes her daughter was treated “unjustly” and that she wants to prevent anyone else from being subjected to similar treatment.

“I just want to defend her in a graceful way. I want to stand up for my child,” she said. “Just treat people with kindness and love, and don’t be judgmental.”

CORRECTION (Jan. 15, 2020, 9:36 a.m.) An earlier version of this article misstated the affiliation of Whitefield Academy. It is a Christian school that is affiliated with a Baptist church; it is not a Catholic school.

Follow NBC Out on Twitter, Facebook & Instagram