NORTH HAVEN, Conn. (WTNH) — Four people, including two juveniles, allegedly opened fire at New Haven police officers Tuesday night before being captured in North Haven, according to authorities.

News 8 obtained New Haven police dashcam video showing officers pursuing the car after ShotSpotter alerts and several 911 callers reported hearing gunshots near Hamilton Street and Grand Avenue around 9:30 p.m. Callers were able to provide police with a description of two vehicles believed to be involved in the gunfire.

“The public’s safety is more at risk if you let them go,” New Haven Police Chief Karl Jacobson said.

He said plain-clothed investigators were working in the area in an unmarked vehicle after a slight uptick in shots-fired incidents in the last few weeks.

“One of the sergeants actually hears the shots and goes to the area, sees the car fleeing the area, calls it out,” Jacobson said.

The police chief said the officers began following the car.

“At some point, a suspect pops out of the sunroof and fires one shot at the officers,” Jacobson said. “Thank god it didn’t hit anybody.”

According to police, officers engaged in a pursuit through Fair Haven, the East Shore district, onto the Interstate 95 South connector, then onto Interstate 91 North and South. The chase ended around 10 p.m. near Exit 9 on Interstate 91 North.

“At some point, we were able to safely deploy the tire deflation system, and the car pulled over,” Jacobson said.

With the help of North Haven police and state police, they recovered three firearms and took two juveniles into custody, along with 18-year-old Tony Gibbs Jr., of New Haven, and Elija Black, of East Haven.

They were charged with first-degree conspiracy to commit assault, weapon in a motor vehicle, carrying a pistol without a permit, high-capacity magazine, larceny of a motor vehicle and interfering with an officer. Black was also charged with unlawful discharge and had multiple warrants out of East Haven.

Gibbs and Black are being held on a $1 million bond.

“Did they know they were officers? We don’t know, but they fired at a car driving behind them,” Jacobson said. “They just fired numerous shots into a car and a house and shot behind them at officers.”

No one was hit by gunfire or hurt in the pursuit.

“It’s something that weighs on you heavily, and we just make sure we surround the officers with the care and help they need,” Jacobson said. “They’re putting their life on the line.”