04/03/2014 at 04:00 PM EDT
In the days leading up to the shooting at Fort Hood
, there was something troubling Ivan Lopez.
"Lopez didn't stand out as the guy you worried about. You wouldn't single him out as someone who is going to shoot up the building. He was quiet, but not scary quiet. You didn't walk into the building and think, I hope Lopez doesn't kill me today," a soldier who served with Lopez tells PEOPLE. "But he wasn't happy. Something was eating at him."
According to reports
, his mother and grandfather died within two months of each other. Initially, the military was not going to let him attend his mother's funeral, but ultimately gave him 24 hours, says the mayor of his hometown in Guayanilla, Puerto Rico.
"The last time I saw him was at the funeral of his mother. He had some problems then," said Mayor Edgardo Harlequin Velez. "He said the army didn't give him enough time away. He didn’t speak a lot. He was a quiet guy."
Lopez, who joined the U.S. Army in 2008, was in treatment for a variety of mental health problems, including depression and anxiety, says Army Secretary John McHugh. He was seen last month by a psychiatrist and showed "no sign of violence to [him]self or others."
He recently bought a .45 caliber handgun, McHugh says, but he did not notify post authorities. "We cannot compel registration," McHugh says, but under Army rules and regulations, the weapon was "not cleared to be on post."
The motive behind the shooting that left four people dead, including Lopez, and 16 more wounded has not been identified, but clearly, something was wrong.
"He got into an argument. I'm not sure what it was about," another soldier who knew Lopez tells PEOPLE. "Something obviously was bothering him."
The Texas Army post was the scene of a mass shooting in 2009
. Thirteen people were killed and more than 30 wounded in what was the deadliest attack on a domestic military installation in history.
Reporting by SUSAN KEATING and CAITLIN KEATING