A University of Connecticut student who had been wanted since Friday in the killing of two people was taken into custody on Wednesday night in Maryland after a multistate manhunt, the authorities said.
The student, Peter Manfredonia, a college senior who had fled Connecticut after a sequence of violent events that included a home invasion and kidnapping, was taken into custody in Hagerstown, Md., the Connecticut State Police wrote on Twitter.
No law enforcement officers were injured when they apprehended Mr. Manfredonia, 23, who had been considered armed and dangerous, the authorities said. They did not immediately provide further details about his capture.
Investigators said this week that they had recovered a stolen black Volkswagen Jetta, which had been driven by Mr. Manfredonia, in New Jersey near the Pennsylvania border. He was later spotted on foot in the Poconos region of Pennsylvania.
The U.S. Marshals Service and the Washington County Sheriff’s Office took Mr. Manfredonia into custody without incident near a Pilot truck stop, the Hagerstown Police Department said.
The authorities said Mr. Manfredonia had gone on a rampage, killing two people and wounding another person before fleeing. It was not immediately clear what prompted the attacks, the police said.
Michael Dolan, a lawyer for the Manfredonia family, said that Mr. Manfredonia was apprehended after he walked out of the woods near the truck stop.
“I know he’s safe and the parents are relieved and he surrendered, and he did what everybody hoped he would do,” Mr. Dolan said on Wednesday night.
Before he was captured, Mr. Dolan had said that Mr. Manfredonia’s parents, sisters and other relatives had been urging him to surrender. He said that Mr. Manfredonia had been struggling with anxiety and depression for several years and had worked with a number of therapists.
The police said that on Friday morning, Mr. Manfredonia used an edge weapon to kill Ted DeMers, 62, a woodworker who had stopped to give Mr. Manfredonia a ride in Willington, Conn., a small town about 30 minutes northeast of Hartford.
Mr. Manfredonia then seriously injured a neighbor who had tried to intervene, the police said.
On Sunday morning, he broke into a nearby home and held the homeowner captive before stealing his guns and a truck, the police said. He drove to the home of Nicholas J. Eisele, an acquaintance in Derby, Conn., and killed him, the police said.
Mr. Manfredonia then kidnapped another person from the home and stole the car that he used to flee to New Jersey, according to the authorities.
It was there that he released his captive, abandoned the vehicle and fled alone into Pennsylvania, where he was seen on foot in the Poconos region, the authorities said.
The F.B.I. and state authorities had embarked on a sprawling manhunt for Mr. Manfredonia, who started at the University of Connecticut in the fall of 2015, and is a senior enrolled in a joint business and engineering program.