A US man suspected of shooting six people on Wednesday was arrested in a foot chase after he was spotted smoking a cigar outside a school, police say.
Radee Labeeb Prince is suspected of shooting dead three people and injuring three others in the US states of Maryland and Delaware.
The spree began 10 hours earlier at a countertop business near the city of Baltimore, officials say.
Mr Prince, 37, worked as a machine operator at the firm.
Police say he later drove to Delaware and shot a man at a used-car dealership.
The shootings triggered a huge manhunt in the area, which ended when a tipster spotted him outside a high school and called police.
Three agents with the Bureau of Alcohol, Tobacco, Firearms and Explosives, who were assisting in the investigation chased him down and took him into custody.
During the chase, Mr Prince threw away a .380 handgun, agents told US media, adding that the bullets inside the gun matched those used in the earlier attacks.
Three people died in the shooting at the Emmorton Business Park near Baltimore.
They were identified as Bayarsaikhan Tudev, 53, of Virginia; Jose Hidalgo Romero, 34 of Aberdeen, Maryland; and Enis Mrvoljak, 48, of Dundalk, Maryland.
Advanced Granite Solutions owner Barak Caba told AP news agency the suspect had been employed with the company for four months.
He described the victims as "the nicest people", adding: "They never even raised their voices to their co-workers. They were peaceful, happy people."
Two other victims were left critically injured and were in hospital with gunshot wounds to the head, said Maryland Governor Larry Hogan.
Investigators are treating the first shooting as a workplace violence incident, according to Dave Fitz, a spokesman for the Baltimore FBI field office.
According to court records, Prince had allegedly been fired from a previous job at another granite company after attacking a colleague.
A different colleague had sought to get a restraining order against him, Harford County court records show.
Harford County Executive Barry Glassman said after the shooting: "Unfortunately, like most suburban counties in America, we are not immune to workplace violence."
Mr Prince is also suspected of shooting a sixth person, more than 50 miles (80km) away, at the second-hand car business in Wilmington, Delaware, police told NBC Philadelphia.
A man at the car dealership was shot three times, the network reports, and was transported to hospital.
Harford County Sheriff Jeffrey Gahler said all five victims in Maryland were employees of the Edgewood business, Advanced Granite Solutions, and were known by the assailant.
"This does appear to be a targeted attack, limited to that business," the sheriff said, adding that the victims were apparently shot with a handgun.
It is not clear if he was still working there at the time of the shooting.
Police have not released a suspected motive.
Local schools and the set of the Netflix series House of Cards, which is about a mile away, were placed on lockdown as police searched the area.