A McHenry County man is facing charges after Algonquin police say he carjacked an 83-year-old woman after diving into her car as she was driving and then attempted to hit two officers with the stolen vehicle Tuesday.

Timothy M. Andrews, 30, of an unincorporated area near Algonquin, is charged with possession of a stolen vehicle, two counts of aggravated vehicular hijacking and three counts of aggravated assault, police said.

While investigating a hit-and-run crash in downtown Algonquin, authorities found a parked vehicle abandoned in the middle of Sunrise Lane about 8:42 p.m., Deputy Chief Ryan Markham said. Andrews, who is believed to have been involved in the crash, was spotted nearby, but he ran toward a Walgreens about a quarter-mile away when police tried making contact with him.

Officers chased Andrews, who then brandished a knife and ran into the parking lot of Jewel-Osco at 1501 E. Algonquin Road, just down the road from the Walgreens, police said.

After trying and failing to enter one vehicle, Andrews smashed the front passenger window of an occupied Dodge Neon and dove into the moving car driven by an 83-year-old Algonquin woman, Markham said. The vehicle hopped a curb and came to a stop, at which point the woman was able to open her door and escape unharmed.

Andrews then took control of the Dodge and tried hitting two police officers who had followed him on foot into the parking lot, authorities said. Neither officer was injured.

Police said they lost sight of Andrews after he sped away in the stolen vehicle. It wasn't long before Barrington Hills police found him about 9 p.m. in the Dodge, which had crashed into a telephone pole on Haegers Bend Road east of North River Road, authorities said.

Andrews, who was armed, refused to cooperate and stayed in the car until he surrendered about 50 minutes later. He was taken to the McHenry County jail after being treated at a hospital for unknown injuries sustained in the crash. He is due in court Thursday morning.

Andrews has been to prison numerous times since 2009 for a variety of charges out of McHenry County, records show. He also has been jailed in Kane County.

Most recently, Andrews was sentenced to four years in prison after pleading guilty to a felony domestic battery charge out of Crystal Lake from July 2015, though he received time off his sentence for good behavior. Prior convictions include felony theft over $500 in McHenry County, possession of a stolen vehicle in Cary, felony burglary out of Algonquin and violating his probation.

• Daily Herald staff writer Harry Hitzeman contributed to this report.