Authorities on Thursday were still investigating why an Iraq War veteran shot and killed three people and wounded 16 others at Texas’ Fort Hood before committing suicide — and have not ruled out terrorism.

“We’re going to keep an open mind. … Possible extremist involvement is still being looked at very, very carefully,” Army Secretary John McHugh told the Senate Armed Services Committee on Thursday.

Authorities said gunman Ivan Lopez, 34, enlisted in the Army in 2008 and served four months in Iraq but never saw combat and was not wounded in action, but was still being evaluated for post-traumatic stress disorder.

“We do not know a motive,” Lt. Gen. Mark Milley said. “We do know that this soldier had behavioral health and mental health issues, and was being treated for that.”

Lopez was a native of Puerto Rico who was married with children and had other relatives living near the Fort Hood area, where 13 people were murdered in 2009 in an attack by a soldier who had embraced radical Islam.

Investigators were exploring several possible angles beyond terrorism, including whether a fight or argument on the base triggered the attack.

“We have to find all those witnesses, the witnesses to every one of those shootings, and find out what his actions were, and what was said to the victims,” a federal law enforcement official said.

Investigators searched the soldier’s home Thursday and questioned his wife, said Fort Hood spokesman Chris Haug.

Lopez’s mother, Carmen Lopez, died in Puerto Rico last year, and he was enraged at the Army for at first refusing to let him attend her services, a childhood pal told El Nuevo Dia, a Puerto Rican newspaper.

Military brass later relented and he was given a 24-hour pass to attend her funeral.