Prince George’s County police arrested a man Monday night after a more than two-hour barricade situation after shots were fired outside a CapitolHeights apartment complex, officials said.

Police responded to the report of a shooting in the 5200 block of Marlboro Pike at about 7:15 p.m., but they found no victims and initially found no gunman, said Cpl. Clinton Copeland, a police spokesman. But a witness told authorities that the man who had fired in the direction of an apartment building had hidden inside an apartment.

Officers established a perimeter around the apartment complex and SWAT units were called to the scene. Police found the man inside his apartment with two family members.

About 9:25 p.m., the man surrendered to police without incident, Copeland said. He was taken into custody on a reckless endangerment charge.

Officials did not immediately identify the man.