GUAYANILLA, Puerto Rico - He grew up in Puerto Rico and played percussion in his high school band. He spent a decade working as a police officer and serving in the National Guard, part of that time as a peacekeeper in Egypt's Sinai Peninsula. And then he joined the U.S. Army.
That was Ivan Lopez's seemingly unremarkable route into the military. But what happened from there -- and why the 34-year-old soldier turned against his comrades at Fort Hood, Texas, with such deadly fury -- baffled some of those who knew him.
"He had a lot of friends. I never saw him fighting. He never seemed like a boy who had emotional problems," said Guayanilla Mayor Edgardo Arlequin Velez, who was also the leader of the school band that Lopez played in in this small, working-class town.
But Fort Hood commander Lt. Gen. Mark Milley said Thursday that there was evidence Lopez was psychologically unstable, and that was believed to be a "fundamental underlying cause" in Wednesday's shooting rampage, in which Lopez killed three people, wounded 16 and took his own life.
Lopez was sent to Iraq as a truck driver in 2011 during the final months of the war there. He did not see combat and was not wounded, military officials said.
He sought help for depression and anxiety and was being evaluated for post-traumatic stress disorder, military officials said. But Army Secretary John McHugh said Thursday that a psychiatrist last month found no violent or suicidal tendencies. The soldier was prescribed Ambien for a sleeping problem.
He had no apparent links to extremists, McHugh said.
Glidden Lopez Torres, who is not related to the gunman but identified himself as a family friend speaking on behalf of the soldier's family in Puerto Rico, said Lopez's mother died of a heart attack in November.
Lopez was close to her and was apparently upset that he was granted only a short leave -- 24 hours, later extended to two days -- to go to her funeral, which was delayed for nearly a week so he could make it, the family spokesman said.
"That was a very frustrating time for him," said Yaritza Castro, who grew up with Lopez and now lives in Miami.
Castro said Lopez had two children from a previous marriage and a third with his widow. He took all three children to Disney World not long before his mother's death.
Castro said Lopez was a thoughtful person who called to check on her when her husband was deployed with the military, and he also sent care packages to her husband.
"He wasn't a monster. He was a very good person," Castro said.
Lopez's family was unaware he was receiving any treatment for mental problems, the family spokesman said. Torres said Lopez's relatives were devastated, trying to comprehend the shooting.
"He was a very laid-back person. I would even say a bit shy," Torres said. "That's why we are so surprised."
Lopez grew up in Guayanilla, a town of fewer than 10,000 people, where small, well-kept houses are painted bright colors. The house he grew up in was empty Thursday. It is a one-story, concrete home painted white with green trim.
There are few jobs in the town, and many young people have joined the military in recent years.
The mayor described Lopez as passionate about music. His parents attended school functions, and they seemed close.
Puerto Rico police officials and Torres, the family spokesman, said Lopez had worked as a state police officer from 2000 until he received leave to serve in the military. He played in bands for both the police department and the National Guard.
In January, his wife, Karla Lopez, wrote "te amo," or "I love you," under a profile picture on a Facebook page believed to belong to Ivan Lopez. The picture shows him leaning back in a car, wearing dark sunglasses, with earphones hanging from his lobes.
The profile, under the name "Ivan Slipknot," includes photos of him in uniform and carrying weapons. Others appear to be family photos.
He spent four years at Fort Bliss in El Paso, Texas, before moving on to Fort Hood. In a statement, Fort Bliss officials said he served as an infantryman, with duties as a rifleman, grenadier and vehicle driver. Because of an unspecified "medical condition," he was reclassified as a truck driver.
In Killeen, Texas, where the family moved after Lopez was transferred to Fort Hood, neighbors in a three-story, blue and gray apartment building described him as friendly.
Shaneice Banks, a 21-year-old business management student who lives downstairs, said that hours before the shooting rampage Wednesday, she ran into Lopez when he came home for lunch.
"They get an hour to come home," Banks said. "He was going to his car and I was like, 'Hey, how's your day going?' And he seemed perfectly fine. He was like, 'Day's going pretty good. I'll see you whenever I come back home.'"