Four people were killed, including one who died of a self-inflicted wound, during a shooting incident on Wednesday at Fort Hood, an enormous US army base in Texas that five years ago was the site of the worst mass killing on an American military installation.

A further 16 people were injured, authorities at the base said.

The commander of the base, Lieutenant-General Mark Milley, told a news conference the injured were being treated either at a local hospital or on the base. All were military personnel.

Milley said the incident began about 4pm local time (10pm BST) at an administration building for a medical brigade. The suspect then moved by vehicle to a building that houses a transport battalion. He was confronted by a military police officer and died of a self-inflicted gunshot wound to the head in a parking lot, Milley said.

Milley said the weapon was a .45 calibre Smith and Wesson semi-automatic pistol bought recently in the local area and not registered with the base, as is required.

Milley said there was no known motive for the shooting.

"At this time there is no indication that this incident is related to terrorism although we are not ruling anything out and the investigation continues," he said.

An ambulence makes its way to the base after the shooting. Photograph: Ashley Landis/EPA

Milley said he did not want to confirm the suspect's name at the briefing because his next of kin had not been identified. However, he said the shooter was married and was undergoing treatment for "depression, anxiety and a variety of other psychiatric and psychological issues".

He said the suspect, who served in Iraq for four months in 2011, had arrived in Fort Hood only in February, having moved from another installation in Texas. He was taking medication and undergoing diagnosis to determine if he had post-traumatic stress disorder.

The suspect was attached to the 13th Sustainment Command (Expeditionary). Its duties include providing logistical support and supplies to other units.As the shootings unfolded, the base's Twitter feed had urged personnel to "shelter in place". The 1st Cavalry Division, which is based at Fort Hood, sent a Twitter alert telling people on base to close doors and stay away from windows.

About an hour later, the base issued a statement confirming the incident: "There has been a shooting at Fort Hood, and injuries are reported. Emergency crews are on the scene. No further details are known at this time."

Bell County sheriff's office lieutenant Donnie Adams said the office had dispatched deputies and troopers from the Texas Department of Public Safety to the nearby base after receiving reports of an "active shooter". FBI spokeswoman Michelle Lee said its agents were also dispatched to the scene.

Barack Obama, in Chicago on a fundraising tour, expressed sorrow that tragedy had once again struck the base. "We’re heartbroken that something like this might have happened again," the president said.

Obama promised to '"get to the bottom" of the latest incident. "Obviously this reopened the pain of what happened at Fort Hood five years ago. We know these families, we know the service to their country and the sacrifices that they make."

In 2009, Fort Hood was the scene of the worst mass shooting ever to take place at a military base in the US. The massacre on 5 November took place at a processing centre where troops preparing to deploy to Afghanistan were receiving medical checkups. It left 13 people dead and more than 30 injured. The gunman, Nidal Hasan, a former army psychiatrist, was convicted by a military court and sentenced to death in August.

In 2011 Naser Jason Abdo was arrested for planning a bomb attack on a restaurant frequented by Fort Hood personnel. An AWOL soldier at the time, he was sentenced to life in prison the following year.

After the 2009 shooting, the US military tightened security at bases nationwide. But last September, a naval contractor, Aaron Alexis, opened fire at the Washington navy yard, leaving at least 13 people dead, including the gunman. After that shooting, defence secretary Chuck Hagel ordered the Pentagon to review security at all US defense installations worldwide and examine the granting of security clearances that allow access to them.

"When we have these kinds of tragedies on our bases something's not working. We'll identify it, we'll get the facts and we'll fix it," Hagel told reporters at a briefing in Honolulu on Wednesday, where he was meeting defence ministers from Asian countries.

General Martin Dempsey, the chairman of the joint chiefs of staff, said in a statement: "Our thoughts and prayers are with the Fort Hood community in the aftermath of this tragedy. Many questions remain and our focus is on supporting the victims and their families ... This is a community that has faced and overcome crises with resilience and strength."

Sprawling over 214,000 acres, Fort Hood is one of the largest army bases in the world, home to more than 45,000 soldiers and 8,900 civilian staff.