Five people have been shot dead by a gunman at Fort Lauderdale airport in Florida, officials say.
It happened at the baggage claim area in Terminal 2, just before 1300 local time (1800 GMT), the airport confirmed.
Eight people were injured. The gunman, has been identified by police as 26-year-old Esteban Santiago, an Iraq war veteran.
Hundreds of people were standing on the tarmac outside the terminal as dozens of police cars and ambulances rushed to the scene.
Witnesses said the attacker walked along the baggage carousals, shooting people as they tried to run or hide. They said he appeared to be in his 20s, was wearing a Star Wars T-shirt and did not say anything as he fired.
The suspect surrendered to police when he ran out of ammunition, the witnesses added.
Officials said he was a passenger who had checked in an unloaded gun and ammunition with his luggage, but then loaded it in the bathroom after landing and collecting his bag.
Flying with firearms is legal in the US as long as the guns are kept in a locked, hard-sided container as checked baggage only, under rules of the Transport Security Administration (TSA). Ammunition is allowed only in checked luggage.
The attacker opened fire at the baggage claim area of Terminal 2 as passengers were collecting their luggage. Witnesses said he walked along the carousals and did not say anything as he shot people who were trying to run or hide.
Mobile phone footage from the scene showed police officers and Transportation Security Administration (TSA) officers frisking passengers.
A Miami TV station tweeted footage apparently filmed inside the baggage claim area. The video shows several injured people lying on the floor, as witnesses shout for medical help.
The gunman was arrested without any shots being fired, said Sheriff Scott Israel.
“At this point, it looks like he acted alone,” he said.
“We are looking at all avenues. We have not ruled out terrorism and we will be pursuing every angle to try to determine the motive behind this attack,” the FBI’s George Piro told journalists.
Sheriff Scott Israel earlier said it appeared that the suspect had acted alone.
Mr Santiago is expected to face federal charges and make his first appearance in court on Monday.
The suspect is a former member of the Puerto Rico and Alaska National Guard, according to the Pentagon. He served in Iraq from April 2010 to February 2011, and ended his service in August 2016.
US media reported that he had received a general discharge from the Alaska National Guard for unsatisfactory performance.
Federal aviation authorities issued a “ground stop” notice, barring flights from leaving or entering the airport.
President-elect Donald Trump tweeted that he was “monitoring the terrible situation in Florida” and that he had spoken to the Florida governor.
“Thoughts and prayers for all. Stay safe!” he added.
Fort Lauderdale is a major tourist hub in the greater Miami area that typically sees an average of 80,000-100,000 passengers every day.
Nearby Miami International Airport announced that “extra security measures” had been put in place “out of an abundance of caution”.