DEWITT, N.Y. (AP) — A sheriff’s deputy investigating a burglary in upstate New York fatally shot two teenagers Wednesday who were in a vehicle he thought was about to run him over, according to authorities.

The deputy fired three shots into the vehicle during an encounter around dawn in the Syracuse suburb of Dewitt, said Onondaga County Sheriff Tobias Shelley.

The deputy, who was investigating one of two smoke shop burglaries in the area, had responded to a call just before 6:30 a.m. about people seen transferring items between two vehicles. He drove bumper to bumper with one of those vehicles, which backed up as the driver attempted to escape.

The deputy was caught by his vehicle in a narrow space, according to the sheriff, and fired to protect himself.

“He had nowhere to flee to. This whole thing happens in seconds,” Shelley said.

The deputy did not activate his body camera but Shelley said a video taken by a resident documented the shooting. That video has not yet been made public.

The vehicle was later found on a Syracuse street, more than a mile away, with two people inside. One was pronounced dead at the scene and the other was pronounced dead at a local hospital, according to state Attorney General’s office, which investigates deaths at the hand of police officers.

Authorities did not name the slain teens or give their exact ages, saying confirmation of their identities was not yet complete.

A third person believed to have been in the vehicle when the teens were shot was still at large, Shelley said. The second vehicle that had been at the scene drove off and had not been found as of Wednesday afternoon. Both vehicles had been reported stolen.

The deputy, who was not identified by authorities, was not injured.

Speaking at a news conference, Shelley did not detail how firing a weapon helped the deputy escape being struck. But he said he had reviewed the video of the shooting several times and felt the deputy had “no options.”

The shooting came after a series of thefts in the area, starting with two vehicles stolen Tuesday night in Syracuse. Those vehicles were linked to two subsequent smoke shop robberies early Wednesday in Oneida and suburban Syracuse.

New York Attorney General Letitia James, whose office probes killings by law enforcement officers, opened an investigation into the double slaying. The deputy was placed on a paid administrative leave by his department, an ordinary procedure when an officer has used lethal force, Shelley said.