Hundreds of students at Manhattan’s elite Beacon High School staged a sit-in Monday — apparently with the blessing of their principal — to protest what they say is a pattern of campus-wide racism.

Beacon science teacher Demetrius Green urged the Hell’s Kitchen student body to boycott classes at a cafeteria rally Friday, and Principal Ruth Lacey later sent an e-mail to students praising “the passion of the speakers.”

After The Post called Lacey on Sunday to ask about the planned protest, she sent a missive to parents saying, “Tomorrow, some students will be participating in a sit-in event to emphasize the seriousness of their concerns.

“Our school celebrates the involvement of students in matters of great importance.’’

Monday’s sit-in started in the cafeteria and moved into the halls of the school, which has about 1,500 students and is the alma mater of Mayor de Blasio’s daughter, Chiara. Many of the protesting teens wore black.

The rally came after a black teen said he overheard a white girl complaining to two white school counselors about affirmative action in the college admissions process. The guidance counselors and teen were looking at data showing that last year, several students who appeared less academically qualified that she got into a top school when she was wait-listed, the girl has said.

“The fact that [the discussion] was able to slide without much repercussion — it’s a problem that needs to be addressed,” said a female teen, only identified as ZH, to The Post on Monday.

The girl who talked to the counselors did not go to school Friday or Monday because “she doesn’t feel safe,” her mom told The Post. City education officials say they are investigating social-media postings that criticized and threatened her.

Some students claimed that racist and discriminatory remarks routinely aren’t addressed at the school. Beacon’s racial makeup is 47 percent white, 20 percent Hispanic, 14 percent black and 9 percent Asian and 10 percent other.

One teen said a teacher once went around her class to talk to students about their “police experiences,’’ going to black students, including her, first.

“It’s not OK because that’s stereotyping,’’ the student said.

Fatima Zekic, a 17-year-old senior and Muslim Student Union leader, said at an afternoon rally, “Beacon has long been a hostile environment for minority students.

“More than that, the administration has done little to address this issue, and in fact, has enabled this type of environment.

“Muslim students have been called terrorists. Mexican students have been called rapists. And white students have used the N-word so regularly that the students of color are unable to confront them about it every single time.”

But a 17-year-old senior who did not participate in the sit-in said, “Honestly, we’re such a privileged school.

“We’re so lucky to have teachers that listen to us, that give us culturally responsible education, and that was taken away from me today. … I lost class time.”

It was not clear if Green, who is under investigation by city education officials for his comments, was in school Monday.

Lacey did not respond to an e-mail seeking comment, and her phone’s voice mailbox was full.

A city Department of Education spokeswoman said in a statement, “Students and staff at Beacon deserve a safe, supportive and inclusive school, and Principal Lacey has clearly communicated to students, staff, and families that she takes these concerns seriously.

“We will support the community’s efforts to foster a welcoming learning environment for everyone.’’

Student organizers of the sit-in said they are urging kids to return to their classes Tuesday.

A related student assembly will be held for each grade Thursday, a schools source said.

Additional reporting by Kate Sheehy and Gabrielle Fonrouge