Authorities at Fort Hood have launched an investigation into the circumstances that led an Iraq war veteran to open fire on Wednesday, killing three soldiers and injuring 16 others before turning the gun on himself.

They want to find out whether a fight or an argument preceded the shootings. They’re also looking at the treatment the man received while he was being evaluated for post-traumatic stress disorder, though no formal diagnosis had been made.

He was also being treated for depression and anxiety, authorities said.

Lt. Gen. Mark Milley, Fort Hood’s commanding officer, said the man had self-reported a traumatic brain injury upon returning to the United States but that he was not wounded in action.

Within hours of the attack, investigators started looking into whether the man’s combat experience had caused lingering psychological trauma.

“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,” said a federal law enforcement official who spoke to The Associated Press on condition of anonymity.

The official said authorities would begin by speaking with the man’s wife. They were expected to search his home and any computers he owned, as well.

Early Thursday, the White House said President Obama had conducted a conference call with members of his national security team, including officials from the FBI and the Pentagon, and directed them to use every resource available to get to the bottom of it.

Milley said the alleged shooter, identified by other officials as Spec. Ivan Lopez, 34, was a military truck driver who served four months in Iraq in 2011.

He had arrived at the post in February from another military installation in Texas. He was married and had family living in the Fort Hood area, Milley said.

The man was living in a rundown apartment complex in northwest Killeen where neighbors said he and his wife kept to themselves.

“He was the kind of person that even if you tried to talk to him wouldn’t open up,” Jessie Brown, a neighbor who often passed him on morning walks, told The Post.

About 4 p.m. Wednesday, the soldier assigned to the 13th Sustainment Command fired shots inside a building housing the 1st Medical Brigade and in a facility belonging to the 49th Transportation Battalion. He was soon confronted by a female military police officer, Milley said. The officer has not yet been identified.

Milley said the man put his hands up but then pulled out a gun from under his jacket. He shot himself in the head with a .45-caliber semiautomatic pistol that was purchased recently but not authorized on the post. There are rules regarding firearms on post.

Emergency responders showed up within 15 minutes, Milley said.

The shooting put Fort Hood on immediate lockdown, which was lifted later Wednesday evening. Fort Hood’s senior commander canceled all physical training for soldiers on Thursday.

There were no immediate indications the incident was related to terrorism, but officials are not ruling anything out, Milley added.

Word of the shooting spread quickly around Killeen. At the shooter’s apartment complex, the Los Angeles Times reported, a woman whom one resident identified as the shooter’s wife was worried because she hadn’t spoken to her husband since 3 p.m. The neighbor, Xanderia Morris, said the woman feared her husband was one of the victims.

A group whom neighbors deduced were family arrived to comfort the woman and, when she heard her husband’s name in the news as the alleged shooter, she became hysterical.

“Everybody [in the family] broke down in tears,” Morris told the L.A. Times.

All of the wounded and killed were military personnel. The 16 injured were taken to the post hospital and other local hospitals. Three of the nine patients at Scott and White Hospital in Temple, Tex., were still in critical condition early Thursday. The other patients were listed as serious but stable, according to hospital staff.

Staff said Scott and White Hospital will hold a news conference Thursday morning.

 Shelby Sementelli contributed to this report.