PORTLAND, Maine — A 27-year-old Massachusetts man has set a course record in winning Sunday’s Maine Marathon.

Dan Vassallo of Peabody, Mass., won the 26.2-mile race 2 hours, 21 minutes, 12 seconds. He broke the previous record of 2:26:54, set by Vassallo in 2007.

Robert Gomez of Saco came in second in 2:24:48, and Moninda Marube of Auburn placed third in 2:30:38.

Twenty-three-year-old Eliza Tibbits of Old Town was the fastest woman, finishing in 3:03:50. Katy Agule of Brighton, Mass., was second in 3:04:44.

For the race, about 100 Maine National Guard members and other military personnel marched the entire marathon course in full uniform and combat boots while carrying 30-pound military backpacks in honor of service members who have been killed in the wars in Iraq and Afghanistan.