A group of black girls in South Africa are fighting to wear their hair naturally.

"The system did not allow for black girls to have Afros. It wasn't written in the code of conduct, but they tell you your hair is very untidy and it's not appropriate with the school uniform," a former student of Pretoria High School for Girls said.

>> Read more trending stories

At South Africa's Pretoria High School for Girls, the code of conduct says, "If hair is long enough to be tied back, it must be tied back neatly in a ponytail." It also says, "All styles should be conservative, neat and in keeping with a school uniform."

"She wants to be natural. They want her to relax her hair, and she doesn't want to relax her hair, so why should she?" one student said.

Students from the local University of Pretoria joined in on the protest and were denied entry to the high school campus.

The demonstration has garnered international attention. A petition asking for the school's code of conduct to change has more than 20,000 signatures.

A South African government official also threw his support behind the schoolgirls, saying, "Schools must embrace cultural diversity."

Pretoria High School for Girls hasn't commented publicly.