An American history professor at Fresno State University in California apologized Thursday for a tweet that said President Donald Trump "must hang" to save American democracy.

The professor, Lars Maischak, said he has temporarily left Fresno while the university is on spring break, after receiving death threats and hundreds of hate emails since the tweet was highlighted by far-right websites such as Breitbart News.

"I regret making these tweets," Maischak said. "I wrote them to an audience of 28 followers on Twitter under the assumption they would be read by people I know."

Maischak said he sent the tweet in February to voice personal despair over comments by Trump and actions by the current U.S. government and was not trying to incite violence.

The tweet said: "To save American democracy, Trump must hang. The sooner and the higher, the better."

Breitbart posted an article Saturday saying the tweet and others on Maischak's account showed opinions that "explain why universities across the country are now viewed with disdain by the average, salt-of-the-earth Americans."

Maischak deleted his Twitter account on Wednesday and says he is prepared to take full responsibility for his statements.

Fresno State has distanced itself from the comments, saying they reflect Maischak's personal views and not those of the university.

University President Joseph Castro said he appreciated Maischak's apology, calling it "a first good step" in calming critics, the Fresno Bee reported.

Castro said the university was committed to free speech and was taking the matter seriously. He said officials had contacted federal authorities, adding his main concern is the safety of students and the campus community.

Maischak said he is under federal investigation and is keeping the Secret Service abreast of his whereabouts.

"I am not in Fresno. I fear for my life," the professor said, adding that when school resumes next week his classes on Monday and Tuesday will be canceled.