The gunman who killed five people at a Florida airport walked calmly through the baggage claim area before wordlessly pulling a handgun from his waistband and shooting at victims who fled or dived to the floor in panic, video showed.

The 20 seconds of footage published on Saturday by website TMZ, apparently from a security camera, shows the suspect carrying a bag and clothing in his left hand as he strolled with other passengers past luggage carousels at Fort Lauderdale's airport.

​Without warning, he pulls out a 9mm semi-automatic handgun with his right hand and fires it repeatedly at targets off-screen. Travellers nearby can be seen reacting in horror and scrambling for cover as the shots ring out.

Esteban Santiago, a 26-year-old U.S. military veteran, was arrested after running out of ammunition and is said by authorities to be cooperating with investigators. He was taken to federal court in Fort Lauderdale on Monday.

Esteban Santiago is escorted from jail to Federal Court for appearance later this morning 0:46

Authorities say they have not ruled out terrorism as a motive. They say Santiago admitted planning the attack and told them he bought a one-way ticket to Florida from his home in Alaska. He could face the death penalty if convicted of federal charges including carrying out violence at an airport.

Six people were wounded in the attack, while about three dozen suffered bruises or broken bones in the chaos as people scattered for cover.

'Shooting in a methodical manner'

Authorities say the gunman arrived on a connecting flight from Alaska and retrieved the Walther weapon from his checked luggage before loading it in a bathroom.

According to a criminal complaint, he then returned to the baggage claim and walked "while shooting in a methodical manner" some 10 or 15 times, aiming at his victims' heads.

On Saturday, it emerged that police in Alaska had taken a handgun from Santiago in November last year, but then returned it to him about a month later after a medical evaluation found he was not mentally ill.

Esteban Santiago, 26, the suspect in the deadly shooting at Fort Lauderdale-Hollywood International Airport, is transported to the Broward County Main Jail by authorities on Saturday. (Jim Rassol/South Florida Sun-Sentinel/Associated Press)

Officials say Santiago walked into an FBI office in Anchorage in November and told agents his mind was being controlled by a U.S. intelligence agency. Local police then took him to a medical facility for the mental evaluation.

Officials in Anchorage said the gun was given back because Santiago had not been adjudicated to be mentally ill.

Santiago served from 2007 to 2016 in the Puerto Rico National Guard and Alaska National Guard, including a deployment to Iraq from 2010 to 2011, according to the Pentagon. An aunt said he returned from Iraq "a different person," MSNBC reported.

The attack was the latest in a series of U.S. mass shootings, some inspired by Islamist militants, others carried out by loners or the mentally disturbed.