A Colorado school would not let 9-year-old Kamryn Renfro attend Monday because she violated the dress code by shaving her head, a show of solidarity for her friend Delaney Clements, 11, who has lost her hair while undergoing chemotherapy treatment for Stage 4 neuroblastoma, a childhood cancer, FOX News reports via 9 News and KDVR.

The Grand Junction Sentinel reports that news of the incident and photos of the two youngsters with bald heads went viral on Facebook.

In a statement, Catherine M. Norton Breman, Board of Directors Chairwoman and President of Caprock Academy in Grand Junction confirmed the policy was intended to “promote safety, uniformity, and a non-distracting environment for the school’s students.” However, she added exceptions could be made “under exigent and extraordinary circumstances,” Grand Junction Sentinel reports.

Kamryn’s mother Jamie Olson Renfro told 9News that the Caprock Academy decided to let her daughter come back to school after holding a special meeting on Monday.

According to the news station, Kamryn Renfro said she has no regrets about her new look: “It felt like the right thing to do.”

Write to Olivia B. Waxman at olivia.waxman@time.com.