BOSTON — A Massachusetts police officer and bystander died Sunday from wounds sustained when a suspect allegedly took the officer’s gun and fired after a vehicle crash and a foot chase.

Weymouth Officer Michael Chesna was shot multiple times by his own firearm around 7:30 a.m., and died at South Shore Hospital, officials said.

An unidentified elderly woman also died after being hit by stray bullets in a nearby home, authorities said.

Weymouth Police Chief Richard Grimes said the shooting suspect, 20-year-old Emmanuel Lopes, was in custody.

Weymouth is located about 16 miles south of Boston on what is known as the South Shore.

Police said the suspect crashed a car, fled the scene, and attacked Chesna with a stone to the head. Chesna fell to the ground, and officials say Lopes took the officer’s gun and shot him multiple times in the head and chest.

Lopes fled and fired more shots during a chase. Police said one of those shots fatally struck the woman in her home.

Lopes suffered a leg wound while being arrested and was hospitalized at South Shore Hospital. He will be arraigned on two counts of homicide Monday, at either his bedside or in court.

Massachusetts Gov. Charlie Baker said on Twitter that his thoughts were with the families of the officer and bystander.

“I am deeply saddened to learn of the passing of Officer Chesna and an innocent bystander today and my thoughts and prayers are with their families, loved ones and the Weymouth PD after this tragic loss,” Baker tweeted.

Michael Chesna

Grimes described Chesna as a 42-year-old Iraq and Afghanistan war veteran who leaves behind a wife and two children, ages 4 and 9. Chesna was from Weymouth and graduated in 1994 from Weymouth High School.

“I hired Mike Chesna six years ago tomorrow,” Grimes said.

Grimes said he had spoken to Chesna’s mother and she said her son joined the military “to open the doors to get in this job.”

“He always had a kind word and a good attitude … we very much appreciated his service to the Weymouth Police Department,” said Grimes, describing the overnight shifts and traffic division duties Chesna held.

Chesna’s body was removed from the hospital and transported via a procession of multiple law enforcement agencies to the state’s medical examiner office in Boston. Dozens of police somberly saluted the vehicle carrying the officer’s body, and mourners placed bouquets by the Weymouth Police Headquarters, now draped in black bunting.

The Norfolk District Attorney’s Office said it cannot release more information on the suspect’s “past court involvement ” prior to court Monday.

Law enforcement groups as close as the Boston Police Department and as far as Maine are taking to social media to express their sadness.

Massachusetts State Police Col. Kerry Gilpin offered her condolences for the “horrific crimes,” and said the State Police Crime Lab “will work tirelessly alongside District Attorney Morrissey and the Weymouth Police Department to speak for those two victims by holding the defendant accountable.”

Comments are not available on this story.