A 31-year-old man was arrested in the shooting death of a security guard early Wednesday outside a student apartment building about half a mile from USC, according to the Los Angeles Police Department.

The shooting was reported around 12:30 a.m. outside the Lorenzo complex in the 300 block of West Adams Boulevard, just south of 23rd Street and east of Flower Street. The victim, a guard at the complex, was shot while trying to escort a trespasser off the property, the LAPD said in a news release.

He died at the scene, officials said. His identity has not been released.

During the investigation, police found a possible suspect sleeping in a parking area near the lobby of the apartment complex, according to the LAPD. The man, later identified as Alexander Crawford, 31, was detained without incident and found to have a handgun in his possession, police said.

Video reviewed by investigators connected the man to the shooting, according to the LAPD, and the gun found in his possession matched the caliber used in the guard’s killing.