O say can you shear?

A deranged teacher in a California public charter school cut a student’s hair while dramatically shouting the national anthem, shocking video shows.

“What so proudly we hail!” an off-key and inaccurate Margaret Gieszinger, 52, belts out in the frightening footage while standing behind a student at University Preparatory High School in Visalia — roughly 40 miles south of Fresno — on Wednesday. “By the twilight’s last streaming, whose bright stripes and bright stars!”

Gieszinger then coolly tossed what appeared to be a snippet of a male student’s hair over her shoulder before diving back into her non-sequitur rant. The student then stood up before checking Gieszinger’s unsolicited handiwork and walking away, video shows.

“Next,” Gieszinger then said while holding up a pair of scissors. “I’m not done … Next.”

The crazed coiffeuse then pointed her arm toward the class, apparently singling out another student to be given a free haircut.

“Oh, don’t you touch me,” another student says off-camera.

The bizarre footage then ends as Gieszinger — who taught science at the school — continues shouting the anthem, singing “o’er the ramparts we watch’d” as students run out of the classroom.

Gieszinger, of Exeter, was arrested on suspicion of corporal injury to a child following the incident, the Visalia Times-Delta reports.

She has since been removed from the classroom and will not return following the “disturbing behavior” shown on the video, a spokesman for the Tulare County Office of Education confirmed to The Post.

“To support all students on the UPHS campus today, we have sent top counselors from our mental health services program,” public information officer Robert Herman said in a statement. “They will continue to be available to the students as long as necessary.”

Gieszinger will be replaced by a substitute teacher for the remainder of the semester, Herman said.

District officials declined to provide additional context to the video, including what immediately preceded the footage and why Gieszinger was holding scissors at the time.

“At this time, we cannot discuss further the details of this matter out of respect for due process, student privacy rights, employee privacy rights and law enforcement’s ongoing investigation,” the statement concluded.

Gieszinger’s teaching credentials were previously suspended on two occasions, most recently in 2016, according to the Visalia Times-Delta. Herman told The Post additional details about those incidents were not immediately available.

Additional reporting by Melissa Cáceres