NEW YORK (AP) — Authorities say a gunman shooting at a minivan carrying members of a rival faction was struck and killed by the van before it crashed into a house on Staten Island.

Police say five people were in custody after the chaos unfolded around noon on Tuesday in the New York City borough's St. George neighborhood.

Court spokesman Lucian Chalfen says the shooting and crash happened as a confrontation outside the Richmond County courthouse carried around the block.

He says court officers gave chase but took cover upon seeing the gunman shooting at the van, which struck and pinned him against a building. Police say the 26-year-old gunman was pronounced dead at the scene.

The van's five occupants were taken into custody. Police say a firearm was recovered at the scene.