PRINCETON, N.J.—Authorities in New Jersey say police fatally shot an armed man who holed up in a restaurant near Princeton University during a five-hour standoff with officers.

The attorney general’s office says no one else was injured during the confrontation Tuesday at the Panera Bread restaurant across from Princeton’s campus.

It was not clear what sparked the standoff that began around 10 a.m.

Officials say police shot the gunman shortly before 3 p.m. after negotiations to get him to surrender were unsuccessful.

His identity was not immediately released.

Authorities shut down Princeton’s downtown area, and two campus buildings were evacuated as a precaution though the university is on spring break.

Armed officers were staged outside the restaurant with their weapons drawn during the negotiations.