Police salute as the casket of Somerville Police Officer Louis Remigio is brought to St. Clement Church in Medford, Mass., Friday, Oct. 13, 2017. Credit: Chris Christo | AP

A Massachusetts police officer killed off-duty when his motorcycle was struck in New Hampshire by an allegedly speeding teenager has been laid to rest.

Hundreds of law enforcement officers turned out to mourn Somerville officer Louis Remigio, a widowed father of two, at Friday’s funeral Mass in Medford.

Authorities say Remigio died Sunday morning when a Mercedes driven by 18-year-old Michael Ricci, of Burlington, hit him head on. New Hampshire police say Ricci may have been racing other vehicles on southbound Interstate 95. Remigio died Monday at a hospital; Ricci was not injured.

Officers from departments across New England saluted as Remigio’s casket — draped with an American flag — was carried into St. Clement Church.

Ricci was arrested Tuesday on an alleged bail violation.