The third-grade student who was banned from school after shaving her head to support her cancer-stricken friend has received an apology from the school's board of directors.

Officials at Caprock Academy in Grand Junction, Colo., told Kamryn Renfro in a statement that, "compassion and selfless acts of courage are to be commended and encouraged."

The board's praise for Kamryn was a change in tone from Monday, when Kamryn was not allowed in the classroom when she showed up with a bald head to support her friend, 11-year-old Delaney Clements, who lost her hair because of chemotherapy while battling a rare childhood cancer.

"Since Delaney is my best friend, I decided to shave my hair because I didn't want her to be the only one," Kamryn told ABC News.

"I couldn't go to school because of my shaved head," she said. "I wanted to share my story but they didn't let me."

School officials told Kamryn's parents their daughter's act of goodwill violated the school's dress code policy that prohibits shaved heads in order to cut down on distractions and promote "safety" and "uniformity."

"Initially, I was furious," said Kamryn's mom, Jamie Renfro. "We still really respected the dress code. We just didn't agree with it."

Renfro took to Facebook to make her case, igniting a firestorm of anger directed at the school.

The school allowed Kamryn to return to the classroom on Tuesday and called the special board of directors meeting that resulted in the apology statement.

"Kamryn did such a selfless thing for my daughter," said Delaney's mom, Wendy Campbell. "She really taught a lesson in integrity."