Former First Lady Hillary Clinton has praised a young girl who said she was punished by her school after refusing to stand for the US Pledge of Allegiance.

Mariana Taylor, 11, said she was inspired by the NFL kneeling protest to kneel during the daily morning recital.

She claims a teacher violated her legal rights, but the school says it has no record of the alleged incident.

"Keep up the good work Mariana," Mrs Clinton wrote on Twitter on Wednesday.

"It takes courage to exercise your right to protest injustice, especially when you're 11!" the former Democratic presidential candidate wrote.

She also shared video of the pupil's testimony to the school board in the US state of Maryland from earlier this summer.

According to Mariana's family, the Catonsville Middle School student chose to kneel back in February to protest against racism and sexism.

They said a teacher reprimanded the girl in front of the classroom, leaving her "in tears".

Mariana spoke about the matter to the Baltimore County School Board on 10 July.

"It is my rights that I am allowed to kneel," she told the committee.

"Students are allowed to take stands as long as it's not disruptive to the classroom, and I feel that my confrontation was more disruptive than kneeling itself."

The American Civil Liberties Union (ACLU) picked up Mariana's case in May.

She said was inspired to kneel by NFL quarterback Colin Kaepernick, who started protesting during the US national anthem at games to highlight perceived police brutality.

Mariana profiled Kaepernick for a homework assignment to write about someone she admired.

President Donald Trump has repeatedly denounced the NFL protests.

Mariana's mother, Joanne Taylor, told CBS News about how her daughter became upset after she was allegedly rebuked by the teacher.

"Mariana became upset right then and there," said Ms Taylor.

"She was allowed to leave the classroom upset, the teacher did not suggest any kind of support [like] that she go to the guidance counsellor.

"It wasn't until her second teacher could not calm her down that she was supportive of Mariana."

The Baltimore County Public Schools said in May that they were not aware of any "student who has been reprimanded or punished for non-participation in patriotic observances".

Students in the US are typically asked to stand and place their right hand over their heart while facing the flag as they recite the pledge each morning.