Police cleared the scene at an El Cajon apartment complex after they say a man was shooting at them from a window Saturday night.
The incident started around 7:40 p.m. at the Timbers Apartments in the 1400 block of Petree Street.
Neighbors told 10News that they heard the man throwing furniture and screaming before he started shooting at police.
Police said the suspect, 45-year-old Samuel Herlevic, shot more than 10 rounds and in different directions. Residents in the complex had to be evacuated. The SWAT team spent more than an hour sweeping through each unit.
Police said after about two hours, Herlevic walked out of the apartment and was taken into custody.
Residents were allowed to go back into their apartments.