A former leader of a black student group was sentenced Friday to 90 days in jail for tweeting anonymous threats against fellow black college students in an attempt to raise awareness about racial issues on campus.

Kayla-Simone McKelvey, 24, of Union Township, speaks with defense lawyer Thomas Ashley during her first appearance at the Union County Jail courtroom in Elizabeth, N.J., Monday, Dec. 14, 2015. (Andrew Miller/NJ Advance Media via AP, Pool)

Kayla McKelvey pleaded guilty in April to creating a false public alarm. She had sought to be allowed to enter a pretrial intervention program that would have allowed her to avoid jail time, but a judge denied the motion a few days before her guilty plea.

Under terms of her sentencing imposed Friday in Union County, McKelvey also will serve five years' probation, serve 100 hours in a labor assistance program with the county sheriff's department and undergo anger management and counseling.

In a statement to the court, McKelvey apologized for sending the messages and said her intent had been to raise awareness but she had gone about it the wrong way.

Prosecutors alleged the 25-year-old tweeted threats from a Kean University library because she wanted more people to attend a November 2015 rally. She then returned to the rally to tell people about the threats.

One tweet addressed to campus police read: "(at)kupolice I will kill all the blacks tonight, tomorrow and any other day if they go to Kean University."

The university increased security, and several law enforcement agencies were also alerted, including the U.S. Department of Homeland Security. The police response and heightened security cost approximately $82,000, and McKelvey will pay restitution in that amount.

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. He remained in his position, however.

An internal report released last month concluded Kean's policies and processes aren't discriminatory. It found that the university's policies are "comprehensive and equitable" and that nearly a fifth of Kean's students are African-American and roughly 30 percent of its employees are black.

(Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)