One of the officials, citing internal U.S. Justice Department updates, said 14 others were hurt. The officials spoke on condition of anonymity because they were not authorized to release information by name.
A U.S. law enforcement official said the shooter died of what appeared to be a self-inflicted wound. The official spoke on the condition of anonymity because the investigation is ongoing.
A Texas congressman said the shooting happened at a medical center at the base. Rep. Michael McCaul, chairman of the House Homeland Security Committee, also identified the suspect as Ivan Lopez. But additional details about the gunman were not immediately available.
The injured were taken to Darnall Army Community Hospital at Fort Hood and other local hospitals. Dr. Glen Couchman, chief medical officer at Scott and White Hospital in Temple, said the first four people admitted there had gunshots to chest, abdomen, neck and extremities and that their conditions range from stable to "quite critical."
The 2009 assault on Fort Hood was the deadliest attack on a domestic military installation in U.S. history. Thirteen people were killed and more than 30 wounded.
The military offered few details on Wednesday's attack. After the shooting began, the Army's official Twitter feed said the post had been locked down. Hours later, all-clear sirens sounded.
On Wednesday evening, a fatigue-clad soldier and a military police officer stood about a quarter-mile from the main gate waving away traffic. Other lanes were blocked by a police car and van.
Meanwhile, relatives of soldiers waited for news about their loved ones.
Tayra DeHart, 33, said she had last heard from her husband, a soldier at the post, that he was safe, but that was hours earlier.
"The last two hours have been the most nerve-racking I've ever felt. I know God is here protecting me and all the soldiers, but I have my phone in my hand just hoping it will ring and it will be my husband," DeHart said.
Brooke Conover, whose husband was on base at the time of the shooting, said she found out about it while checking Facebook. She said she called her husband, Staff Sgt. Sean Conover, immediately to make sure he was OK, but he could not even tell her exactly what was going on, only that the base was locked down.
"I'm still hearing conflicting stories about what happened and where the shooting was exactly," Conover said in a telephone interview, explaining that she still did not know how close the incident was to her husband.
"I just want him to come home," said Conover, who moved to Fort Hood with her husband and three daughters two years ago.
President Barack Obama vowed that investigators would get to the bottom of the shooting.
In a hastily arranged statement in Chicago, Obama said he was following the situation closely. He said the shooting brought back painful memories of the 2009 attack.
Obama reflected on the sacrifices that troops stationed at Fort Hood have made - including enduring multiple tours to Iraq and Afghanistan.
"They serve with valor. They serve with distinction, and when they're at their home base, they need to feel safe," Obama said. "We don't yet know what happened tonight, but obviously that sense of safety has been broken once again."
The president spoke without notes or prepared remarks in the same room of a steakhouse where he had just met with about 25 donors at a previously scheduled fundraiser for the Democratic National Committee. White House officials quickly pushed tables to the side of the room to make room for Obama to speak to the nation.
The November 2009 attack happened inside a crowded building where soldiers were waiting to get vaccines and routine paperwork after recently returning from deployments or preparing to go to Afghanistan and Iraq.
Army psychiatrist Nidal Hasan was convicted and sentenced to death last year in that mass shooting. He said he acted to protect Islamic insurgents abroad from American aggression.
According to testimony during Hasan's trial last August, Hasan walked inside carrying two weapons and several loaded magazines, shouted "Allahu Akbar!" - Arabic for "God is great!" - and opened fire with a handgun.
Witnesses said he targeted soldiers as he walked through the building, leaving pools of blood, spent casings and dying soldiers on the floor. Photos of the scene were shown to the 13 officers on the military jury.
The rampage ended when Hasan was shot in the back by Fort Hood police officers outside the building. He was paralyzed from the waist down and is now on death row at the military prison at Fort Leavenworth in Kansas.
After that shooting, the military tightened security at bases nationwide. Those measures included issuing security personnel long-barreled weapons, adding an insider-attack scenario to their training and strengthening ties to local law enforcement, according to Peter Daly, a vice admiral who retired from the Navy in 2011. The military also joined an FBI intelligence-sharing program aimed at identifying terror threats.
In September, a former Navy man opened fire at the Washington Navy Yard, leaving 13 people dead, including the gunman. After that shooting, Defense Secretary Chuck Hagel ordered the Pentagon to review security at all U.S. defense installations worldwide and examine the granting of security clearances that allow access to them.
Asked Wednesday about security improvements in the wake of other shootings at U.S. military bases, Hagel said, "Obviously when we have these kinds of tragedies on our bases, something's not working."
ABC News and the Associated Press contributed to this report.