FORT LAUDERDALE, Fla. — Federal law enforcement officials said they were investigating whether the gunman who opened fire on Friday at the airport in Fort Lauderdale, Fla., killing five people and wounding eight, was mentally disturbed and heard voices in his head telling him to commit acts of violence.
According to a senior law enforcement official, the gunman, identified as Esteban Santiago, 26, walked into the F.B.I. office in Anchorage in November and made disturbing remarks that prompted officials to urge him to seek mental health care.
Mr. Santiago, appearing “agitated and incoherent,” said “that his mind was being controlled by a U.S. intelligence agency,” the official said.
Other officials said it was too early to tell whether Mr. Santiago, who was captured in the airport, had been inspired by terrorist groups, including the Islamic State. The officials said he had viewed extremist materials on the internet.
Shortly after 1 p.m. Friday, the suspect, who had been an airline passenger, pulled a semiautomatic handgun out of his bag and opened fire in a crowded baggage claim area in Terminal 2, officials said.
I’m at the Ft. Lauderdale Airport. Shots have been fired. Everyone is running.
— Ari Fleischer (@AriFleischer) January 6, 2017
The shooting spurred a scene of panic and confusion that played out on live television as scores of travelers burst out of the terminal and onto the tarmac, running and seeking cover, at times in response to erroneous rumors of follow-up attacks.
David Fogarty, a carpenter from Key West, was heading to Cancún, Mexico, on vacation when the people around him suddenly began running toward the gates.
“Everybody was dropping gear, panicking, jumping over tables,” Mr. Fogarty said in a phone interview. “We were saying: ‘What is going on? Are there people shooting?’ I am not hearing any gunshots, and the whole place is panicking.”
Officers took Mr. Santiago into custody without firing a shot, and on Friday evening, he was being interviewed by F.B.I. agents and county investigators, as the wounded were being treated at hospitals.
— Broward Sheriff (@browardsheriff) January 6, 2017
The senior law enforcement official said Mr. Santiago was making “disjointed” statements in his Anchorage F.B.I. visit.
“Although Santiago stated that he did not wish to harm anyone, as a result of his erratic behavior, interviewing agents contacted local authorities,” who took him to a medical facility for evaluation, the official said.
“The F.B.I. closed its assessment of Santiago after conducting database reviews, interagency checks, and interviews of his family members,” the official said.
On Twitter, President-elect Donald J. Trump said that he was “monitoring the terrible situation in Florida” and that he had spoken to Gov. Rick Scott.
Hours after the attack, a picture began to emerge of Mr. Santiago as a man who had served his country, but who had experienced trouble and failure. Mr. Santiago was discharged in August from the Alaska Army National Guard for “unsatisfactory performance,” according to Lt. Col. Candis A. Olmstead, the spokeswoman for the Alaska Guard. In September, Mr. Santiago became a father when his son was born, according to an aunt, Maria Luisa Ruiz, a resident of Union City, N.J., who spoke on Friday to the newspaper The Record.
In an email, Ms. Olmstead said that Mr. Santiago joined the Puerto Rico National Guard in December 2007. In 2010, he deployed to Balad, Iraq, with the 130th Engineer Battalion, which spent a year clearing roads of improvised explosives and maintaining bridges; he was awarded a Meritorious Unit Commendation.
At least two soldiers from his company were killed in insurgent attacks during the tour, but there is nothing in the record that indicates Mr. Santiago had been in combat.
Ms. Olmstead said he served in the Army Reserves before joining the Alaska Army National Guard in November 2014. Before his discharge last year, he worked as a combat engineer as a private first class. An official service record released on Friday by the Army showed that Mr. Santiago had received a number of commendations, including the Army Good Conduct Medal.
Mr. Santiago’s brother, Bryan Santiago, told The Associated Press that Esteban was born in New Jersey and moved to Puerto Rico when he was 2.
An Unknown Motive
Nelson Cruz, a Puerto Rico senator who represents Peñuelas, the city in Puerto Rico where Mr. Santiago grew up, said he met Mr. Santiago about seven or eight years ago, and found him to be a “good young man” who loved his family.
Mr. Cruz said he spoke on Friday with Bryan Santiago, who relayed that the family was shocked by the news of the killings. The family offered no known motive for the crime, but noted that Esteban had recently been hallucinating and was receiving psychological treatment.
“Bryan said his brother went to Iraq or Afghanistan, one of those places, and came back with psychological problems,” Mr. Cruz said. “He would suddenly see visions, but that he was a calm young man and was never violent.”
Esteban Santiago liked sports (particularly boxing, as Bryan is a boxing trainer) and was proud of his military career. “We don’t know what happened with this guy,” Mr. Cruz said. “He was an intelligent, brilliant young man who came back affected. When he came back from the conflict, he did not return well.”
He added that the family wanted to express condolences, but was in a state of panic over the number of news reporters outside their house.
At a news conference late Friday in Florida, officials warned that learning the gunman’s motive would be a long, complex process. “We have not ruled out terrorism, and we will pursue every angle to try to determine the motive behind this attack,” said George Piro, the special agent in charge of the F.B.I.’s Miami division.
The shooting comes at a tense time for a nation that has been watching nervously as terrorist attacks have occurred elsewhere in the world, and as Mr. Trump, who has promised to bar Muslims from entering the country, prepares to ascend to the presidency.
Officials said that he had flown on a flight from Alaska to Minneapolis, and then to Fort Lauderdale-Hollywood International Airport.
In a Facebook post, a Broward County commissioner, Chip LaMarca, said the assailant had been a passenger on a Canadian flight who had checked his weapon in his luggage and then, upon disembarking, went to the airport bathroom to load it.
“Came out shooting people in baggage claim,” Mr. LaMarca wrote.
On CNN, Mark Lea, a witness, said the gunman “just randomly shot people, no rhyme or reason.” After the shootings, the gunman lay facedown, spread eagle and “waited for the deputies to come get him,” he said.
At that point, the gunman showed no remorse, Mr. Lea said.
“He didn’t say anything,” he said. “Nothing. No emotion, no nothing. About as straight-faced as you could get.”
Witnesses also recounted scenes of confusion and fear.
“All of a sudden there was a stampede,” said Tara Webber, 41, of Allentown, Pa., who was heading home after a four-day cruise to the Bahamas and was waiting with relatives in Terminal 3 for her flight. Those who were not running, she said, “hit the floor.”
She and her father, Dan Trinkle, 63, dived under a set of plastic chairs. Ms. Webber said she almost landed on a little girl, who was crying, and tried to comfort her.
“This was the scariest thing I’ve ever done in my life,” said Ms. Webber, who works for her father’s limousine company. “We’re going to get a car and drive all the way home.”
Her father said he went for the floor like everyone else. “Then the cops told us to leave all our stuff and get out,” he said. “Everything was thrown around all over the place.”
Mr. Trickle said the police and airport authorities seemed unsure of how to handle the situation. “As far as I’m concerned, they weren’t prepared for something like this,” he said. “We were all out on the runway for hours. It made no sense.”
He said he and his family were allowed to leave after three hours and go to a hospital only because his girlfriend, Barbara Keinert, 57, had left her insulin on the cruise ship and needed another dose.
‘He Is a Lone Shooter’
The suspect’s name was made public by Senator Bill Nelson, Democrat of Florida, soon after the shooting. Mr. Nelson said he had learned the name from the administrator of the Transportation Security Administration, Peter V. Neffenger. Mr. Nelson said Mr. Neffenger had also told him the suspect was in possession of an American military identification.
Barbara Sharief, the mayor of Broward County, said authorities were confident that the gunman had acted alone.
“Based on the preliminary reviewing of the footage tapes, he is a lone shooter,” Ms. Sharief said. “He is alive, he was not harmed, not shot.”
Airport police officers chased the gunman through the terminal as he continued to fire before apprehending him unharmed near a departure gate and arresting him.
The scene that unspooled after shots rang out was intensely chaotic. Live TV showed government vehicles blocking the roads to and from the airport and scores of travelers milling on the tarmac, apparently having been evacuated from the building. Some could be seen marching en masse across the pavement, wheeling bags behind them.
Moments later, the passengers would burst into movement, like frightened birds, running one way or another, apparently in reaction to concerns, which authorities later said were unfounded, that more attacks were underway.
A number of witnesses called in to television news programs almost immediately after it happened. John Schlicher, a traveler who spoke in a phone interview with MSNBC, said he had been traveling with his wife and mother-in-law and they were retrieving their bags from a carousel when he heard the first shot.
“I wasn’t sure what it was at first, but I saw the person right to my side fall to the ground, and I turned and looked and the shooter was in the center hallway,” he told MSNBC. Mr. Schlicher did not hear the gunman speak, and described him as slender, with dark hair, and possibly wearing a blue “Star Wars”-themed T-shirt.
Mr. Schlicher said he and everyone around him dropped to the ground. “I put my head down and prayed,” he said.
Florida’s Gun Laws
The shooting came as Florida lawmakers were preparing to consider legislation that would relax prohibitions on firearms. State laws allow for the purchase of rifles, handguns and shotguns without a permit, though a license is required to carry a concealed weapon in the state.
The legislation, which was proposed last month, would eliminate some “gun-free zones” in Florida — which currently include airport terminals, schools and government meetings. The bill was introduced by State Senator Greg Steube, a Republican and longtime opponent of gun-free zones.
As the false alarms subsided at the airport, the scene remained tense. Workers and passengers leaving the airport were searched by law enforcement personnel. Passengers who had been on planes on the tarmac were forced to stay in their seats, where they received updates from captains and crew members.
Television news stations showed video of medics taking care of a bleeding victim outside the airport. News helicopters showed hundreds of people standing on the tarmac as an ambulance drove by.
With the airport shut down, the Federal Aviation Administration said that flights headed to Fort Lauderdale had been delayed or diverted to other airports.
A number of travelers described harrowing moments of panic. Melody Dorward and a colleague, Amberly Buccholz, had just stepped off a Spirit Airways flight from Ohio when they got caught up in the tide of people who ran down the terminal.
They joined in and were directed out to the tarmac, clustered there with others, shifting from spot to spot.
Rumors of more gunfire spread through the crowd, with many convinced they had heard shots.
“I called my family to say goodbye,” said Ms. Dorward, 22, an e-commerce worker, “to tell them I love them.”