A Suffolk County police officer fired three shots into a car after it backed into him and hit a police vehicle in Medford early Wednesday, injuring a suspect in a gas station theft with flying glass, police said.

The Fifth Precinct officer who fired the shot and the injured suspect were taken to hospitals with non-life-threatening injuries, police said. They were treated and released. Police didn’t provide additional details about whether the injured suspect faced charges.

A second officer was taken to a hospital for evaluation and released, police said. The driver of the 2014 Dodge Charger, Sheldon Davis, 43, of Coram, was arrested and charged with driving while intoxicated after fleeing the scene, police said.

See alsoWatch a video report DataGun crime numbersPhotosRecent LI mug shots

At about 1 a.m. Wednesday, the officers were at 76 Gas Station, 2243 Rte. 112, “when the clerk reported to them an attempted larceny” had occurred about a half-hour earlier.

“As the officers were leaving the location, the suspect’s vehicle returned with three occupants,” police said in a news release. “The officers returned and approached the vehicle. While [the] officers were speaking to the vehicle’s occupants, the vehicle fled, striking one of the officers and a marked police car. After being struck by the vehicle, the officer fired three shots at the vehicle.”

Det. Lt. Kevin Beyrer, of the Suffolk homicide squad, told News 12 Long Island that each officer was at an open door of the car when the driver put it in reverse, hitting the police car. The open doors on the suspect’s vehicle “forced the officers back,” Beyrer said.

advertisement | advertise on newsday

The officer hit by the fleeing car then opened fire, police said.

“No one in the car was hit [by gunshots],” Beyrer said. “Only one person in the car was hit by fragmented glass.” Beyrer said the three suspects in the vehicle then fled.

Police said they found the suspects on Flores Lane in Middle Island. A third suspect fled the scene; police had no other details.

Davis pleaded not guilty at his arraignment Wednesday on charges of drunken driving and first-degree aggravated unlicensed operation of a motor vehicle. He was held on a bail of $10,000 cash or $20,000 bond. He was represented by Legal Aid, which does not comment on cases.

A spokesman for the Suffolk district attorney’s office said Davis had bloodshot, watery eyes, his breath smelled of alcohol and his clothes smelled of marijuana. Davis also refused to take an alcohol breath test, had slurred speech and was unsteady on his feet, the spokesman said.

With Ellen Yan