A Rutgers University student was killed and his roommate, a recent graduate, was seriously injured in a shooting at their apartment near the school’s campus in Newark, the authorities said on Monday.

The Rutgers Police Department said that the shooting was not random and that the downtown campus, which serves about 12,000 students, was not under threat.

The student, Shani Patel, 21, was shot and killed shortly before 10 p.m. on Sunday at an off-campus apartment building near the corner of Central Avenue and Halsey Street, said Katherine Carter, the spokeswoman for the Essex County Prosecutor’s Office.

Mr. Patel’s roommate, a 23-year-old whose identity has not been released, graduated last year from the Newark campus of Rutgers, the State University of New Jersey, Ms. Carter and the Newark police said. The roommate was in critical condition on Monday at University Hospital in Newark.