A man suspected of two murders — one in Rockford and another at an I-39 rest stop — was arrested Friday afternoon near the Wisconsin border after a police pursuit ending in an crash.

Terrence Doddy, 36, was taken in to police custody after Illinois State Police troopers located him on Wisconsin Highway 81 near Beloit about noon, according to Rockford police and Illinois State police.

The Rockford man had been spotted July 3 about 8 p.m. by an off-duty Winnebago County officer near Machesney Park. Then, at 11 a.m. Friday, a state trooper saw Doddy driving a gray Nissan — believed to be the vehicle that had belonged to the rest stop victim — in Rockton, about 5 miles south of Beloit, State Police said.

State Police Air Operations canvassed the area and helped multiple police agencies chase down Doddy. He eventually lost control of the Nissan and was taken into custody with the help of the Winnebago Sheriff’s office and Beloit police.

Charges were pending Friday evening.

Doddy was being sought in the murder of Todd Hansmeier, whose body was found by firefighters responding to a fire Monday on Alpine Road in Rockford, State Police said.

The arrest warrant, charging three counts of murder, carries a $1 million bond, authorities said.

On Wednesday, state police had named Doddy a “person of interest” in the death of a woman Tuesday at an I-39 rest stop in Paw Paw, about 20 miles west of Aurora.

About 8:30 p.m. Tuesday, an attendant at the Willow Creek Rest Stop found an unresponsive woman, police said. She was later identified as Tonya D. Bargman, 44, of downstate Monticello.

Surveillance video shows a man attacking her as she left the restroom, police said.

Doddy was seen driving away in the woman’s vehicle, a gray 2013 Nissan Altima with license plates BARGMN 2, state police said.

A car stolen in the Rockford murder was found abandoned on I-39, authorities said.