SALEM, N.J. — Police said they have taken into custody a man who began firing on officers as tried to arrest him, sparking a standoff Wednesday that lasted more than three hours. The standoff ended with the man’s surrender about 3 p.m., with no injuries reported.

Police said a task force was trying to arrest a man they identified as Eric Smith around 11:30 a.m. when the man fired multiple shots from an apartment on East Broadway.

Salem Police Chief John Pelura said at least one member of a fugitive task force fired back. Pelura did not say what charges Smith was facing when the task force attempted to arrest him.

The incident happened near county buildings, including the courthouse, and drew a large police presence and a lot of media attention as first reports indicated it was an “active shooter” situation.

Schools and businesses in the small Salem County city about 45 miles south of Philadelphia were locked down during the standoff.

This article contains information from the Associated Press.