A U.S. army soldier who allegedly opened fire at a military base in Texas, killing 12 people, was reportedly still alive Thursday evening.

Initial reports said that the gunman had been shot dead by police during the incident at the Fort Hood base. But in a shocking twist on Thursday evening, base spokesman Lt.-Gen. Bob Cone said that the suspected gunmen was in fact still alive and in hospital.

"He is currently in custody and in stable condition," said Cone, speaking to reporters at Fort Hood.

"He is hospitalized, and I've had no personal background with him that I can speak of."

The armed suspect has been identified as Maj. Nidal Malik Hasan, aged 39. Hasan is a psychiatrist who was about to be deployed overseas.

Along with 12 deaths, at least 30 people were injured in the violence, which is the worst-ever at a U.S. military base.

The shootings began at the base's Personnel and Medical Processing Office around 1:30 p.m. local time. The office handles administration for soldiers who are about to be deployed to Iraq and Afghanistan.

U.S. President Barack Obama said the shooting was a "horrific outburst of violence" which attacked men and women who were trying to serve their country.

"It is horrifying that they should come under fire," Obama added.

Fort Hood is a massive base that is among the largest in the U.S. and is home to as many as 50,000 soldiers. The base is located about 150 kilometres south of Dallas.

Police and emergency staff held guard at nearby schools for much of the day, and the entire base was locked down for several hours.

Earlier in the day, it was suspected that up to three people had opened fire. However, by 8 p.m., law enforcement agents had ruled out that possibility.

Background on the suspect

Hasan had no children and graduated from Virginia Tech University. CNN has reported that Hasan was an American citizen of Jordanian origin. It isn't clear if he was born in Jordan.

According to retired Col. Terry Lee, who once worked with Hasan, the psychiatrist was about to be sent to Afghanistan for service.

Lee told Fox News Thursday that Hasan frequently argued with other soldiers who supported U.S. military operations in Iraq and Afghanistan.

Hasan worked at the Walter Reed Army Medical Center for six years but was transferred to Texas in July.

Earlier reports had said that there were two shootings, with the second incident occurring at the base's Howze Theatre.

Base spokesman Chris Haug said that a graduation ceremony for a night school class was set to begin at the theatre.

Rev. Greg Schannep said that he was heading into the graduation ceremony when he was warned by a man in uniform about gunfire. Schannep then heard three volleys of shots and spotted several people fleeing the area.

"There was a burst of shots and more bursts of shots and people running everywhere," said Schannep.

Two other U.S. soldiers were initially arrested in connection with the incident. They were later released, said the office of Texas Congressman Rep. John Carter.

"I was confused and just shocked," said Spc. Jerry Richard, a 27-year-old who works on the base. "Overseas you are ready for it. But here you can't even defend yourself."

Soldiers at Fort Hood don't carry weapons unless they are doing training exercises.

With files from The Associated Press