On the other side of the cemetery entrance, Alison Richards, 33, shielded her 3-month-old son, Daniel, from the cold inside a front baby carrier that was covered with a Marine Corps flag.
"We're a military family — it's important," said Richards of Derry, N.H., who was with her sister, Courtney Lovely of Salem, who also had a baby in a carrier.
Tom Burke of Salem, whose son went to school with Ayube, brought a large American flag from home that his family was given when his father, a World War II veteran, died more than 25 years ago.
"It's just to show that people care," said Burke, a Lynn teacher. "Look at all the Scouts down here. It's a community effort."
During the funeral service inside a packed St. James Church, Ayube, a 25-year-old senior combat medic in the 3rd Squadron, 2nd Stryker Cavalry Regiment, was remembered as a loving son, husband and brother who joined the military out of a sense of duty and hope.
"All he wanted to do, deep down, was to fix the world and make everyone happy," his 17-year-old sister Ashleigh said in a eulogy.
In a light moment, the teenager lovingly remembered her older brother as an "accident-prone goon" who once singed his wife's hair while playing with a lighter, before offering up a "goofy" apology.
The stairway leading into St. James Church was lined with honor guards from the Police Department, Fire Department, Salem High Marine Corps Junior ROTC, and veterans organizations.
About 50 members of the Patriot Guard Riders, a citizen motorcycle group that attends veterans funerals from Iraq and Afghanistan, Rolling Thunder, a POW/MIA activist group, and the North Shore Riders Motorcycle Club stood along the church stairway holding flags.