Dale Brigham thought he was doing the right thing.

As anonymous death threats against minorities swirled on social media Tuesday night, setting the college town of Columbia, Mo., on edge, the bespectacled Mizzou professor began receiving e-mails from terrified students.

“Good Evening Professor Brigham,” wrote an African American student in Brigham’s Nutritional Science 1034 class. “There are online threats at our school warning the minorities to not step on campus tomorrow. I am scared for my life therefore, I will not be attending class tomorrow. When can I makeup the exam?”

Brigham, a popular professor and fitness buff who volunteered with many Mizzou athletic teams and clubs, responded with a challenge.

“If you don’t feel safe coming to class, then don’t come to class,” Dale Brigham replied in an e-mail that appears to have been sent to his entire class. “I will be there, and there will be an exam administered in our class.

“If you give into bullies, they win. The only way bullies are defeated is by standing up to them. If we cancel the exam, they win; if we go through with it, they lose.

“I know which side I am on,” Brigham wrote. “You make your own choice.”

Many minority students responded with anger and disbelief.

“That’s our lives in danger,” said Triniti, 19, an African American student of Brigham’s who asked The Post not to use her full name for fear of retaliation. “I don’t want to even touch campus. I don’t even want to leave my house, let alone go to campus.”

“My Teacher had the nerve to email me, ‘If we cancel class, then we let the bullies win.’ Like this is a game or something,” wrote another student on Twitter.

Soon the anger spilled beyond the confines of Brigham’s classroom. People posted his office phone number and e-mail address on Twitter

“How can [you] tell a student to face bullies when there are threats that he will die?” reads another e-mail posted to Twitter. “He is fear for his life and you are telling him to still risk his life to come to YOUR class to take a test? Are you kidding? These aren’t bullies we are talking about…”

By late Tuesday night, Brigham had apologized to students.

“I could have and should have used much better words in trying to say that we must stand up to hatred and not let those kind of people who make threats run our lives,” he wrote at least one class member.

But it was too late.

By Wednesday morning, the flood of criticism had become too much for the Missouri professor, whose most high-profile previous interaction with the media was an interview on the inelasticity of demand for peanut butter.

“The exam is cancelled,” Brigham wrote. “No one will have to come to class today. And, I am resigning my position.”

“I am just trying to do what I think is best for our students and the university as an institution,” Brigham told KOMU 8 News. “If my leaders think that my leaving would help, I am all for it. I made a mistake, and I do not want to cause further harm.”

Dozens of students took to Brigham’s defense, bemoaning what they called the professor’s unfair treatment.

“I’d go on a hunger strike over Dale Brigham’s forced resignation, but he taught me better than to deprive my body of essential nutrients,” quipped one former student.

The loudest voice objecting to Brigham’s treatment, however, belonged to a former Mizzou Tigers football star.

“Grow up,” tweeted former wide receiver T.J. Moe, who was team captain in 2013, his senior year. “We are raising a society of more cowards.”

But Brigham was not alone among Missouri faculty facing outrage. Melissa Click, the media professor who barred a journalist from photographing protesters and called for “muscle” to help remove him, and Janna Basler, the director of Mizzou Greek Life who also blocked journalists, have also come under fire.

While Brigham underestimated the gravity of the threats, Click and Basler appeared to have overestimated them by including media among those menacing protesters.

All three made missteps under the omnipotent eye of social media.

And all three are paying the price.

Combined, their experiences reflect a harsh new reality for American university professors: a combination of politics and technology has made it easier than ever for professors to become targets. In the age of Facebook and Twitter, trigger warnings and microaggressions, college professors can go from being educators to the accused in the blink of an eye.

The phenomenon can be seen across the country and traced to the rise of smartphones.

In 2006, a conservative group openly offered UCLA students money to inform on professors.

The Bruin Alumni Association offered  $10 for an “advisory” that a class should be examined, $50 for “full detailed lecture notes and all professor-distributed materials,” and $100 for “full, detailed lecture notes, all professor-distributed materials and full tape recordings of every class session,” the group’s founder, Andrew Jones, told Inside Higher Ed.

Critics called it “spying,” “right out of the Stalinist playbook.”

In 2013, conservative students called for the firing of an adjunct lecturer after a video of him railing against Republicans went viral online.

But similar surveillance has also brought down liberal professors.

Last year, a professor was “unhired” by the University of Illinois after he posted controversial tweets criticizing Israel and its 2014 invasion of Gaza.

“You may be too refined to say it, but I’m not: I wish all the (expletive) West Bank settlers would go missing,” scholar Steven Salaita tweeted. “#Israel kills civilians faster than the speed of 4G.”

Eighteen months later, Salaita and Illinois are close to reaching a settlement agreement, the Chicago Tribune reports.

Earlier this year, the American Association of University Professors published a report, “Civility and Academic Freedom after Salaita,” denouncing discipline against Salaita and other professors across the country.

Among the other cases highlighted: a University of Kansas associate professor put on indefinite administrative leave for angrily tweeting about the NRA after the 2013 Navy Yard shooting and a Bergen Community College professor who was punished for posting a photo of his daughter doing yoga in a “Game of Thrones” T-shirt.

“In effect, this is what an American university looks like when it has succumbed to the pressures of anti-intellectual interest groups and legislators, as well as an ideological blindness bent on reducing higher education to nothing but a corporate model,” AAUP’s report said.

This February, Northwestern professor Laura Kipnis wrote an essay in the Chronicle of Higher Education criticizing “sexual paranoia” on campus, only to be targeted by a crowd of 30 protesters carrying mattresses and pillows. Students filed a Title IX lawsuit against her, but she was cleared of wrongdoing.

In June, a professor wrote an anonymous piece for Vox titled “I’m a liberal professor, and my liberal students terrify me.”

“I’m a professor at a midsize state school,” the piece began. “I am not a world-class teacher by any means, but I am conscientious; I attempt to put teaching ahead of research, and I take a healthy emotional stake in the well-being and growth of my students.

“Things have changed since I started teaching. The vibe is different. I wish there were a less blunt way to put this, but my students sometimes scare me — particularly the liberal ones.

“… The student-teacher dynamic has been reenvisioned along a line that’s simultaneously consumerist and hyper-protective, giving each and every student the ability to claim Grievous Harm in nearly any circumstance, after any affront, and a teacher’s formal ability to respond to these claims is limited at best.”

“… The relationship of trust between professors and students seems to be weakening as more students become monitors for microaggressions,” echoed NYU professor Jonathan Haidt in an article for the Atlantic on “the coddling of the American mind.”

“I don’t mind if students complain directly to me. Each lecture involves hundreds of small decisions, and sometimes I do choose the wrong word or analogy. But nowadays, e-mail and social media make it easier for students to complain directly to campus authorities, or to the Internet at large, than to come talk with their professors. Each complaint can lead to many rounds of meetings, and sometimes to formal charges and investigations.

“Increasingly, professors must ask themselves not just What is the best way to teach this material? but also Might the most sensitive student in the class take offense if I say this, and then post it online, and then ruin my career?”

For Brigham, Click and Basler at Mizzou, this now appears to be coming true. All three are now facing the fierce and lasting consequences of momentary but misguided decisions.

Click, whose screaming, screen-grabbed face spread like wildfire on social media, has been branded “Public Enemy No. 1 for conservatives.” Rush Limbaugh took a whack at her on his radio show.

Even the supposedly liberal media and academia turned on her. The Post’s media blogger, Erik Wemple, called for her to be fired. Her Mizzou colleagues, meanwhile, were considering revoking her courtesy appointment to the university’s journalism school Tuesday afternoon when Click spared them the trouble and resigned instead, retaining her faculty position in the Department of Communications.

She and Basler, also caught on the viral video confrontation, have both apologized. Yet both could be in serious trouble. Basler has been put on administrative leave pending an investigation, the Columbia Missourian reported.

It could get worse for the two protest supporters.

The videographer, Mark Schierbecker, has filed a “municipal simple assault” complaint against Click with the MU Police Department, claiming she physically and verbally assaulted him, according to the Missourian.

“Click should also go,” said Schierbecker. “That’s my number one priority at the moment, is making sure she never teaches ever again.”

He has also called for Basler to resign or be removed.

Meanwhile, a former associate dean of the Mizzou journalism school has filed Title IX complaints against both Basler and Click over the incident.

“Apparently, in the eyes of MU, it is OK for a staff member or faculty member to assault a student without ramifications,” Brian Brooks told the Missourian.

Brigham, however, has some (literally) powerful backers. Dozens of former students took to social media to bemoan his resignation, none of them bigger or more loved in Missouri than former Mizzou football star T.J. Moe.

In a series of tweets on Wednesday afternoon, Moe hit Brigham’s critics as hard as any safety he ever ran over on the playing field.

Moe also tweeted out a photo of an offensive, expletive-laden e-mail that someone allegedly sent to Brigham, although The Post could not confirm that the photo was genuine. The football player had previously spelled out his thoughts on racial tensions on campus and his former team’s boycott on Twitter.

On Wednesday evening, Brigham received a boost from an even more powerful backer: the University of Missouri.

Brigham’s resignation had been rejected, a Mizzou spokesman told KOMU.