US officials have confirmed that four people have been killed in a shooting at the Fort Hood military base in Texas.

The gunman is among the dead.

At least 16 others were injured, with four of them said to be in a critical condition.

Fort Hood was on lockdown for about three hours after the shooting.

It is the same base where a military psychiatrist killed 13 soldiers in 2009 after proclaiming a holy war against the US.

The soldier, named locally as Ivan Lopez, carried out yesterday's shooting at the Fort Hood base then went on to kill himself when confronted by a US military police officer.

Speaking at a press conference, the commanding officer at the base, Lieutenant General Mark Milley, said the soldier served in active combat in Iraq for four months in 2011 but is not believed to have suffered any injuries while on duty.

He was being treated for depression and anxiety and was under assessment for a possible diagnosis of post traumatic stress.

All of those killed and injured at the Fort Hood base were members of the military.

The soldier carried out the shooting with a .45 calibre Smith and Wesson semi-automatic gun which had been purchased recently in the local area.

Investigators said initially there was no evidence that the incident was related to terrorism, but said the investigation was continuing.

The soldier is understood to have opened fire in one location, then got into a vehicle, fired from the vehicle and then entered another building on the base and opened fire there.

The soldier was then challenged by a member of the military police. When she engaged him, he then turned his weapon on himself.

Speaking this morning, US President Barack Obama said he was "heartbroken" and that the attack brought back painful memories.

He said: "Any shooting is troubling.  Obviously this reopens the pain of what happened at Fort Hood five years ago.  

"We know these families. We know their incredible service to our country and the sacrifices that they make. Obviously our thoughts and prayers are with the entire community.  

"And we are going to do everything we can to make sure that the community at Fort Hood has what it needs to deal with the current situation, but also any potential aftermath."