(CNN) The five joined the military to serve their country, willing to go to dangerous lands out of a sense of duty, idealism and patriotism. And at least three of them did go abroad, risking their lives in Iraq and Afghanistan.

Ultimately, the men died together on home turf, in Chattanooga, Tennessee.

Authorities are still trying to piece together why Mohammad Youssuf Abdulazeez killed four Marines and a Navy sailor at a Navy operational center in the southeastern Tennessee city, which is thousands of miles from any war zone. Terrorism is being investigated as one possibility, especially considering that a military recruiting center was also shot at, though it was not immediately known whether Abdulazeez had any connection to a known militant group.

Nor is it known whether he had any link to those killed or wounded. Among the latter are a Marine recruiter shot in the leg and responding Chattanooga police Officer Dennis Pedigo, who was shot in the ankle.

Whatever the motive, it's clear that there are families who are now hurting badly, as is the community at large.

"Each of these men who lost their lives had served incredibly well," Gov. Bill Haslam told CNN on Friday morning. "We're heartbroken."

Gunnery Sgt. Thomas Sullivan: 'He was our hero'

Thomas Sullivan was a Marine gunnery sergeant.

When Springfield, Massachusetts, resident Jim Sheremeta first heard of Thomas Sullivan's death, it hit close to home. Sullivan was from the Springfield suburb of Hampden.

"My heart just went down to my toes because I said, 'My God,' " he said.

As Gov. Charlie Baker posted a picture of Sullivan on Facebook alongside the words "terror comes home to Massachusetts," Springfield acknowledged the loss by lowering the American flag to half-staff outside City Hall.

"Sgt. Sullivan dedicated his life in brave service to his country," Mayor Domenic Sarno said in lamenting an "assassination" and "tragic loss." "And to see it end under such tragic circumstances is heartbreaking."

Sullivan joined the military in 1997 and had taken three tours of duty in the Marines since then, the first spanning parts of 2004 and 2005 and the most recent running from August 2014 to January 2015.

He was a two-time Purple Heart winner, among many other honors, including a Good Conduct Medal, Combat Action Ribbon and Global War on Terrorism Service Medal, according to the military.

But Sullivan was more than the recognitions he received.

"He was our hero," a Facebook post states, "and he will never be forgotten."

Sullivan was a 1994 graduate of Cathedral High School, according to the school's Facebook page. Springfield Bishop Mitch Rozanski issued a statement offering his condolences to Sullivan's family.

"As a decorated member of our nation's armed forces, he represented all that is good about our country, upholding our values and a willingness to put the needs of others ahead of self," Rozanski wrote. "Through his tours of duty, he sought to bring stability to corners of the globe too often visited by senseless violence.

"At the same time he was a beloved son and brother, loved dearly by his family and fondly remembered by the Cathedral High School community as an upstanding student and alumnus."

Lance Clp. Squire K. Wells: 'You couldn't find a nicer guy'

Skip Wells joined the Marines last year.

The U.S. military lists his name as Squire K. Wells, but to those who know him best, he was simply Skip.

A 2012 graduate of Sprayberry High School in the Atlanta suburb of Marietta, where he was in the band, Wells went on to study history at Georgia Southern University. The school said Wells was enrolled from 2012 through fall 2013.

Just last month, his mother, Cathy, posted touching words about the love between her and her son, to which Skip replied that he would readily carry his mother to safety "on my back ... with a weapon." Pictures posted recently to Facebook showed mother and son on a trip to Disney World.

He became a Marine in 2014. Listed as a field artillery cannoneer, Wells had already earned a National Defense Service Medal.

Cathy Wells said, "My son died doing what he loved for the love of his country and his family."

Members of Wells' family, including his mother, served in the military, said Garrett Reed, a close friend since fourth grade.

Wells was a dedicated member of the JROTC program at Sprayberry, friends said. They described him as always positive, friendly, and encouraging.

"He was one of those guys where he didn't really belong in a certain group," said Ethan Wade, who participated in JROTC with Wells and graduated last year. "He was in every group and everybody just liked him. ... He was great."

Another family friend, Andy Kingery, said he expects to hear many more good stories about Skip in the coming days.

"Skip is the kind of kid you want on your team. If you had a team, you wanted 20 Skips," Kingery said, smiling.

"He was always ready to help, no matter what it was -- whether it was church, band, and even with the Marines. He was ready to serve and help."

Staff Sgt. David Wyatt: Beloved father and husband

David Wyatt leaves behind a wife and two children.

David Wyatt accomplished a great deal in his military career, which began in 2004.

Wyatt, who was born in Morganton, North Carolina, and grew up in Ozark and Russellville, Arkansas, did two tours of duty between October 2007 and April 2008 as part of Operation Iraqi Freedom. He was deployed again for parts of 2010 and 2011 for what the military called Operation Enduring Freedom, which relates to the yearslong campaign in Afghanistan. Wyatt amassed many medals, commendations and other honors for his service.

"David will always be remembered for the heroic way in which he lived, served, and died," according to the obituary posted online by a Chattanooga funeral home.

Formerly an Eagle Scout in the Boy Scouts of America, he'd decided to join the Marine Corps after the events of September 11, 2001, "being the longtime patriot he was," it added.

Lorri Wyatt acknowledged her husband's death in a post on Facebook with a picture of him with his arms around his two small children, Rebecca and Heith, as they clutch American flags.

Many of their friends made that image or a Marine Corps logo covered by a black ribbon their own profile picture, while others posted condolences and remembrances.

"He was such a great husband and father," wrote one woman. "I'm so so sorry for you Lorri."

The widow responded with thanks, as well as an admission that she couldn't sleep. She also posted another photo of her and her husband of over 10 years in uniform.

Wyatt -- who will be remembered for his dry humor as well as being a loving family member and friend -- will be buried in the town where he died, his pallbearers members of the Marine Corps with whom he served, the funeral home said.

"Because of his love for the Chattanooga community and their outpouring of support during this time, his family has chosen to lay him to rest in Chattanooga National Cemetery with full military honors."

Sgt. Carson Holmquist: 'We miss you Daddy'

Carson Holmquist had done two tours in Afghanistan.

Carson Holmquist's Facebook page featured an image of a waving American flag. His country -- and serving it -- were clearly very much part of who he was.

He enlisted in the Marines in January 2009 and had already had two tours in Afghanistan -- one in 2013, the other in 2014. Holmquist got numerous recognitions for his work; the military identified him as an automotive maintenance technician.

His Facebook page indicates Holmquist is from Grantsburg, Wisconsin, and was living in Jacksonville, North Carolina. It also features a number of heartbreaking pictures of him sharing tender moments with his wife and son.

In one of those images, the little boy is wearing what look like his father's combat boots next to a sign that says, "We miss you Daddy." In another, he holds up a sign saying "Welcome home Daddy."

His mother has her own sign that read, "We've waited 244 days for this moment. Welcome home Sgt. Holmquist."

Close friend Ian Garia posted tributes to Holmquist on Facebook, saying he deployed with him to Afghanistan.

"There are few people I would say this about but I would have trusted him with my life and my entire family's life without a single hesitation," Garia wrote.

"He was a great mentor and friend and I considered him my brother ... gonna miss you man deer season ain't ever gonna be the same ... see you when it's my turn."

Petty Officer Randall Smith: He served 'for your freedom'

Randall Smith was from Paulding, Ohio.

Smith died Saturday from injuries sustained in the shooting rampage, according to Darlene Proxmire, Smith's stepgrandmother.

The Navy confirmed that a wounded Navy petty officer died Saturday morning.

Smith saw the shooter and warned people around him, according to family members. But he was unable to get away.

The logistics specialist was shot in the liver, colon and stomach, said his grandmother, Linda Wallace.

Smith originally was from Paulding, Ohio, according to Proxmire, who spoke to CNN affiliate WANE.

"It's hard to understand how somebody can hurt somebody that's serving for you -- for your freedom, for your safety," Proxmire said.