Hours after the attack, a picture began to emerge of Esteban Santiago (above) as a man who had served his country but who had experienced trouble and failure.
Santiago was discharged last August from the Alaska Army National Guard for "unsatisfactory performance", according to Lieutenant-Colonel Candis Olmstead, spokesman for the Alaska Guard.
In September, Santiago became a father when his son was born, an aunt in New Jersey, Ms Maria Luisa Ruiz, told newspaper The Record.
In an e-mail, Lt-Col Olmstead said Santiago joined the Puerto Rico National Guard in December 2007. In 2010, he deployed to Balad, Iraq, with the 130th Engineer Battalion; he was awarded a Meritorious Unit Commendation.
At least two soldiers from his company were killed in insurgent attacks during the tour.
His aunt and uncle in New Jersey said Santiago had not been the same since a 10-month deployment in Iraq, MSNBC reported.
Lt-Col Olmstead said Santiago served in the Army Reserves before joining the Alaska Army National Guard in November 2014. Before his discharge last year, the private first class had worked as a combat engineer.
An official service record released by the army on Friday showed that Santiago had received a number of commendations, including the Army Good Conduct Medal.