A college student sought by police as a suspect in a crime spree including two slayings in Connecticut has been captured in Maryland, police said Wednesday night.

Peter Manfredonia, 23, had been the subject of a six-day search involving several police agencies and the FBI.

He was found in the area of a truck stop in Hagerstown, Maryland. He was not injured and no officers were hurt during the arrest, Connecticut State Police said.

“The suspect will face justice, and this will bring closure. This is what is important for the families of the victims,” said Trooper First Class Christine Jeltema, a spokeswoman for Connecticut State Police.

Manfredonia was wanted in the machete killing of 62-year-old Ted DeMers and the wounding of another man in Willington, Connecticut, on Friday. Cyndi DeMers, the victim’s wife, has said Manfredonia was looking for a female acquaintance when he came walking down the road in front of their home wearing a motorcycle helmet. Her husband offered him a ride to his motorcycle.

The University of Connecticut senior also went to another man’s home, held him hostage, stole his guns and truck and drove about 70 miles southwest to Derby, Connecticut, state police said.

In Derby, police found Manfredonia’s high school friend, Nicholas Eisele, 23, shot to death in his home Sunday. Authorities believe Manfredonia then forced Eisele’s girlfriend into her car and fled the state. The girlfriend was found unharmed with her car at a rest stop near Columbia, New Jersey.

A gun that police believe was used in the slaying of Eisele was recovered near where Manfredonia was taken into custody, Jeltema said.

Authorities have not offered a possible motive for the crimes.

Investigators tracked Manfredonia to Pennsylvania, where police said he took an Uber to a Walmart in East Stroudsburg, not far from the New Jersey border. Police discovered through interviews with the driver and from security camera footage that Manfredonia walked behind the store and onto railroad tracks, authorities said.

A man fitting his description was spotted Tuesday night near Scranton, Pennsylvania, prompting another search there. And police later suspected Manfredonia to be in the Hagerstown, Maryland, area, where a ride-hailing service dropped off someone matching his description Wednesday.

A lawyer for the suspect’s family, Michael Dolan, said they were relieved the search had ended peacefully.

Dolan said Manfredonia, a Newtown native, was an honors engineering student at UConn who had a history of depression and anxiety but had not shown signs of violence.

“This came as a total surprise to everybody based on Peter’s past,” he said. “He’s been a kindhearted person who has no history of violence or any trouble with the law.”

Connecticut Gov. Ned Lamont offered thanks to police agencies including those in other states that were involved in the search.

“We are appreciative of their unified approach to this disturbing situation,” Lamont said on Twitter.