The attack on Europe's third-busiest airport was the deadliest in a series of suicide bombings this year in Turkey, part of the U.S.-led coalition against Islamic State and struggling to contain spillover from neighboring Syria's war.
President Tayyip Erdogan said the attack should serve as a turning point in the global fight against terrorism, which he said had "no regard for faith or values". U.S. President Barack Obama and Russian President Vladimir Putin condemned it in separate phone calls with Erdogan, his office said.
Five Saudis and two Iraqis were among the dead, a Turkish official said. Citizens from China, Jordan, Tunisia, Uzbekistan, Iran and Ukraine were also among the 13 foreigners killed.
One attacker opened fire in the departures hall with an automatic rifle, sending passengers diving for cover and trying to flee, before all three blew themselves up in or around the arrivals hall a floor below, witnesses and officials said.
Video footage showed one of the attackers inside the terminal building being shot, apparently by a police officer, before falling to the ground as people scattered. The attacker then blew himself up around 20 seconds later.
"It's a jigsaw puzzle ... The authorities are going through CCTV footage, witness statements," a Turkish official said.
The Dogan news agency said autopsies on the three bombers, whose torsos were ripped apart, had been completed and that they may have been foreign nationals, without citing its sources.
Broken ceiling panels littered the kerb outside the arrivals section of the international terminal. Plates of glass had shattered, exposing the inside of the building, and electric cables dangled from the ceiling. Cleanup crews swept up debris and armed police patrolled as flights resumed.
"This attack, targeting innocent people, is a vile, planned terrorist act," Prime Minister Binali Yildirim told reporters at the scene in the early hours of Wednesday morning.
"There is initial evidence that each of the three suicide bombers blew themselves up after opening fire," he said. The attackers had come to the airport by taxi and preliminary findings pointed to Islamic State responsibility.
Two U.S. counterterrorism officials familiar with the early stages of investigations said Islamic State was at the top of the list of suspects even though there was no evidence yet.
No group had claimed responsibility more than 12 hours after the attack, which began around 9:50 p.m. (1850 GMT) on Tuesday.
VICTIMS OF MANY NATIONALITIES
Istanbul's position bridging Europe and Asia has made Ataturk airport, Turkey's largest, a major transit hub for passengers across the world. The Istanbul governor's office said 109 of the 239 people hospitalized had since been discharged, but the health minister said 41 were still in intensive care.
"There were little babies crying, people shouting, broken glass and blood all over the floor. It was very crowded, there was chaos. It was traumatic," said Diana Eltner, 29, a Swiss psychologist who was traveling from Zurich to Vietnam but had been diverted to Istanbul after she missed a connection.
Delayed travelers were sleeping on floors at the airport, a Reuters witness said, as some passengers and airport staff cried and hugged each other. Police in kevlar vests with automatic weapons prowled the curbside as a handful of travelers and Turkish Airlines crew trickled in.
The national carrier said it had canceled 340 flights although its departures resumed after 8:00 am (0500 GMT).
Paul Roos, 77, a South African tourist on his way home, said he saw one of the attackers "randomly shooting" in the departures hall from about 50 meters (55 yards) away.
"He was wearing all black. His face was not masked ... We ducked behind a counter but I stood up and watched him. Two explosions went off shortly after one another. By that time he had stopped shooting," Roos told Reuters.
"He turned around and started coming towards us. He was holding his gun inside his jacket. He looked around anxiously to see if anyone was going to stop him and then went down the escalator ... We heard some more gunfire and then another explosion, and then it was over."
AIM TO MAXIMIZE FEAR
The attack bore similarities to a suicide bombing by Islamic State militants at Brussels airport in March that killed 16 people. A coordinated attack also targeted a rush-hour metro train, killing a further 16 people in the Belgian capital.
Islamic State militants also claimed gun and bomb attacks that killed 129 people in Paris last November
"In Istanbul they used a combination of the methods employed in Paris and Brussels. They planned a murder that would maximize fear and loss of life," said Suleyman Ozeren, a terrorism expert at the Ankara-based Global Policy and Strategy Institute.
Turkey needs to work harder on "preventative intelligence" to stop militants being radicalized in the first place, he said.
The European airports association ACI Europe said airport security had been stepped up across the continent after the Brussels attacks, but said many of the fatalities in Istanbul came as people queued for security checks at the entrance.
"We must face the reality that when dealing with a terror threat based on suicide bombing, no security measures can ensure 100 percent protection," it said.
The two U.S. officials said the Istanbul bombing was more typical of Islamic State than of Kurdish militant groups which have also carried out recent attacks in Turkey, but usually strike at official government targets.
Yildirim said it was significant that the attack took place when Turkey was having successes in fighting terrorist groups and mending ties with some of its international partners.
Turkey announced the restoration of diplomatic ties with Israel on Monday after a six-year rupture and has been trying to restore relations with Russia, a major backer of Syrian President Bashar al-Assad.
One of the U.S. officials said there had been a "marked increase" in encrypted Islamic State propaganda and communications on the dark web, which some American officials interpret as an effort to direct or inspire more attacks outside its home turf to offset its recent losses on the ground.
Both officials spoke on the condition of anonymity to discuss the probe, which they said is being led by Turkish officials with what they called intelligence support from the United States and other NATO allies.