(Reuters) - A Massachusetts state college apologized on Saturday for Twitter messages filled with racist language, anti-immigrant speech and praise for President Donald Trump that had been sent from its hacked social media account.

Electronic cables are silhouetted next to the logo of Twitter in this September 23, 2014 illustration photo in Sarajevo. REUTERS/Dado Ruvic

Salem State University President Patricia Meservey said in an emailed statement that none of the recent tweets, which were sent out around 11:45 p.m. on Friday, represented the views of the school.

“We have done great work in the area of social justice and will continue to do so until incidents such as this no longer occur,” Meservey said. “As a community, we are committed to stand against such hateful acts.”

According to screenshot photos posted online, the tweets called the Black Lives Matter movement “unneeded and unnecessary,” said that Trump “has done nothing but great things” for America and used a racial slur to describe former President Barack Obama.

One tweet said “immigrant thieves” were not welcome in the United States and that “our education revolves around white working Americans.” A subsequent post included Trump’s campaign slogan “Make America Great Again.”

Many Americans have sensed an unsettling rise in racial hostility since Trump took office in January, or at least a greater willingness by some to express it, according to a recent Reuters/Ipsos opinion poll.

The number of hate crimes in the United States has surged since his election, fueled by passions inflamed during a campaign that focused on issues such as race, religion and national origin, according to a report from the Center for the Study of Hate & Extremism at California State University in San Bernardino.

Meservey said campus police regained control of the account soon after the university learned of the hack, deleted the tweets, and were putting additional security in place to prevent future incidents.

Salem State University, located about 25 miles north of Boston in the city famous for its 1692 witch trials, has an enrollment of about 9,000. About 35 percent of the freshmen class last year were of racial minorities, its website said.

The investigation into the hack, which occurred on the night before the school’s graduation ceremony, was not completed, the university said.