Days after a video surfaced showing an Orange Coast College professor telling students that Donald Trump’s election was an “act of terrorism,” violent threats have forced the instructor to flee her home state of California.

Olga Perez Stable Cox — who was secretly recorded by one of her students last month when she was discussing the presidential election — received a flood of angry emails, phone calls and Facebook comments — some of which were violent and threatening, according to the Orange County Register.

An email Cox received said, “You want communism, go to Cuba . . . try to bring it to America and we’ll put a [expletive] bullet in your face,” according to the paper.

The threats didn’t end there, according to Rob Schneiderman, president of the Coast Federation of Educators/American Federation of Teachers Local 1911 that represents Cox.

“Someone emailed her a picture of her house, with her address,” he told the Orange County Register, noting that the email referred to Cox as a “libtard, Marxist, hatemonger, nutcase” and said “her home address is now going to be sent everywhere.”

In total, more than 1,000 messages were directed at Cox, OCC and her union, the paper reported. In the end, the flood of anger proved overwhelming, and Cox turned her final week of class this semester over to a substitute, Schneiderman told the Orange County Register.

He described Cox as a “lesbian, Latina woman living in Orange County.”

“She’s pretty strong,” he added.

The acrimony swirling around Cox sparked demonstrations on the OCC campus this week, according to the Los Angeles Times. On Monday, several dozen students and teachers held a rally to support the embattled teacher that included signs saying “We support academic freedom” and “OCC for Olga,” the Times reported.

“I want to let Olga know this is her home,” Elias Altamirano, a 20-year-old OCC student who helped organize the rally, told the Orange County Register. “She doesn’t have to feel threatened.”

The gathering led to a counter-demonstration hours later in which protesters — some of them members of the campus Republicans group — held up a whiteboard displaying Cox’s controversial comments and signs saying, “Hold teachers accountable again” and “Teach, don’t preach,” the paper reported. Using a computer on hand, the students also played Cox’s recording on loop, the Orange County Register reported.

School officials did not immediately respond to a request for comment about whether Cox has temporarily stopped teaching. Last week, a university spokesman said officials were investigating the recording.

The widely shared video shows Cox standing in front of her students in a class days after the election. She refers to the president-elect as a “white supremacist” and said “we have been assaulted.”

Cox — a psychology professor who teaches a class on human sexuality — also referred to Vice President-elect Mike Pence as “one of the most anti-gay humans in the country.” She also told her students that the nation is as divided now as it was “in Civil War times.”

“First of all, we are the majority; more of us voted to not have that kind of leadership, and we didn’t win because of the way our electoral college is set up, but we are the majority, and that’s helping me to feel better,” she said. “I’m relieved that we live in California. It is one of the best states and I love that and I love living here, but I’m especially proud of our legislature who did put out a message.”

Cox’s comments were recorded by a conservative student in her class who found her statements offensive and decided to share the video with the Orange Coast College Republicans, according to Joshua Recalde-Martinez, a political science major and president of the campus Republicans group.

Recalde-Martinez said that his group decided to publicize the video this week after OCC President Dennis Harkins failed to address Cox’s behavior or respond to the group’s complaint “in a timely manner.” Recalde-Martinez said a handful of conservative students were present for Cox’s comments, and many felt ostracized by her words and afraid that their grades might be affected by freely speaking their minds.

The Orange Coast College Republicans plans to file a formal complaint with the school and has hired an attorney, said Shawn Steel, who is a former chairman of the California Republican Party.

Steel told the Orange County Register that Cox is using her power as a grade-determining instructor to “basically scare and shame students.”

“It’s alarming,” he said. “It’s scaremongering. It’s irrational. It’s a rant. And it doesn’t belong in the classroom.”

Attempts to reach Cox were not immediately successful.

Steel sent the following letter to Harkins, the school president:

Recalde-Martinez said Cox’s rhetoric ignores the diversity of opinion that exists on a college campus, even in a liberal state such as California, where Hillary Clinton received 8,753,788 votes to Trump’s 4,483,810.

“This is a place that prides itself on being a diverse student college, and her comments go against all of that,” he said. “You’re dealing with a diverse population, and when she states that ‘we are the majority,’ she’s not taking into account that there may be Republican students in the class of over 200 students — she’s not being inclusive.”

Recalde-Martinez said his group will continue to protest Cox’s comments until the professor faces “some corrective measures,” such as anger management classes, and offers an apology to all of her students. He said the college Republicans group is not calling for her to be fired.

“She is — to my knowledge — a tenured professor, and I think that’s an extreme measure,” he said. “If you’re able to educate her that a classroom is for education and not for indoctrination, I think something good will come from it.”

“I hope she will be a professional professor once again,” he added.

Cox’s name has been added to a controversial website called “Professor Watchlist,” which lists the names of about 200 academics from across the country accused by a conservative group of advancing “leftist propaganda” and discriminating “against conservative students.”

Juan Gutierrez, director of marketing and public relations at OCC, said school officials are aware of the video and are “looking into the matter.”

In particular, he said, officials want to understand the context in which Cox’s comments were made and whether her statements were a response to a question or part of a larger discussion. He said it was important to recognize the rights of the students as well as the professor.

“Instructors and professors enjoy academic freedom to challenge their students, and it may make people uncomfortable, and that’s how you get a spirited dialogue,” Gutierrez told The Post. “We support a respectful discourse. The purpose of the college experience is to share different perspectives on these complex issues.”

Gutierrez said Cox has been a professor at OCC for more than 20 years.

Schneiderman told the Orange Country Register that Cox’s speech is a protected right.

He said the student who recorded her may have violated school and state codes — an act that could warrant punishment.

“This faculty member is known for her open and engaging ways in class, open to all sides of the issues,” Schneiderman said. “It’s unfortunate that this student chose to not engage in an open dialogue, which she encourages.”

The union posted a statement on its Facebook page defending Cox and labeling her one of the OCC community’s “most respected faculty members.”

Student reviews of Cox’s class going back as far as 2007 were consistently positive, with anonymous praise for her guest speakers and lectures.

“Awesome teacher, loved the class!” one student wrote. “Only class where I’ve attended every day! Take her :)”

“AWESOME IN EVERY WAY!” another wrote. “It opens you up and you learn so much about yourself. Take her advance class, you take field trips. She is super nice and helpful if you need to talk to her.”