A former leader of a black student group has been jailed for creating a false public alarm by tweeting anonymous threats against fellow black college students.

Kayla McKelvey, 25, pleaded guilty in April to creating a false public alarm by tweeting about a bomb at Kean University in Union, New Jersey.

She was sentenced to 90 days in jail on Friday. Her sentence also includes five years of probation, NBC4 reports.

McKelvey tweeted the threats from a university library on November 17 last year because she wanted more people to gather at a rally on racial issues, prosecutors said.

Scroll down for video

Kayla McKelvey (pictured left, and right, in court in December last year) has been jailed for 90 days for creating a false public alarm by tweeting anonymous threats against fellow black college students

McKelvey tweeted the threats from a university library on November 17 last year because she wanted more people to gather at a rally on racial issues, prosecutors said

She then returned to the rally to tell people about the threats.

One message sent to campus police said: ‘@kupolice I will kill all the blacks tonight, tomorrow and any other day if they go to Kean University.’

Another tweet said: 'The cops won't save you... you're black.' There was also a tweet on the account that claimed there was a bomb on the campus.

The university increased security, and several law enforcement agencies were also alerted, including the U.S. Department of Homeland Security.

Prosecutors have said the threats spread fear and panic across the campus.

Prosecutors have said the anonymous threats spread fear and panic across the campus. Above, McKelvey with her attorney Thomas Ashley in December

One message sent to campus police said: ‘@kupolice I will kill all the blacks tonight, tomorrow and any other day if they go to Kean University’

They also said that $80,000 was spent for the extra security and the investigation.

The threats also prompted a group of black ministers to call for Kean President Dawood Farahi to resign, saying the threats showed that he hadn't done enough to address racial tension on campus.

McKelvey and her attorney had sought to have her participate in a pretrial intervention program that would have allowed her to avoid jail.

But a judge denied that request in April.

McKelvey, who is originally from Charlotte, North Carolina, was Kean University’s homecoming queen in 2014 and president of the school’s Pan-African Student Union.

The school has one of the most racially diverse campuses in New Jersey.

Last year's freshman class was 31 per cent white, 30 per cent Hispanic, 20 per cent black, 5 per cent Asian and 14 per cent unknown or other, according to state data.