LONG ISLAND, N.Y. (PIX11) — A man was accused of robbing a gas station on Long Island and hitting an officer with a car, police said on Saturday.

Joshua Basile, 35, first stole some food from a gas station in Bohemia before going to another gas station along Veterans Memorial Highway near Express Drive North in Islandia, officials said. There, he held the store clerk at gunpoint and demanded money and cigarettes at around 1:40 a.m. on Thursday before driving off, according to authorities.

An alert was sent out, and K-9 Section officer Ralph Dimasi saw the car Basile was driving and conducted a traffic stop. When Basile was asked to get out of the car, he drove off, hitting Dimasi and knocking him to the ground, according to police. The officer was taken to a hospital for treatment of non-life-threatening injuries.

After detectives launched an investigation, Basile was found driving along the Long Island Expressway in Queens Friday afternoon. When the police attempted to do a vehicle stop, Basile hit and disabled a police car with the car he was driving, authorities said. He was eventually found in Queens Village and was taken into custody around 4 p.m.

Basile, a Holbrook resident, was charged with robbery, criminal possession of a weapon, criminal use of a firearm, assault and petit larceny, according to officials. His arraignment is set at First District Court in Central Islip on Saturday.