Witnesses described scenes of terror and panic on Tuesday evening as the attackers began shooting indiscriminately and then blew themselves up at the entrance to Ataturk airport, one of Europe's busiest hubs.
The assault, at the start of Turkey's crucial summer tourist season, was the latest in a wave of attacks in Istanbul and the capital Ankara over the past year, putting the country on high alert.
Five wounded in bomb attack on police in Turkey's southeast
There was no immediate claim of responsibility but Prime Minister Binali Yildirim said "the evidence points to Daesh", using another name for the group.
The city's governor said 41 people were killed, including 13 foreigners, and 239 wounded.
President Recep Tayyip Erdogan called for an international "joint fight" against terror, as Western allies including the United States condemned the "heinous" attack.
Yildirim said the three suicide bombers had arrived at the airport in a taxi and opened fire at the entrance to the international terminal before detonating their explosives.
Security camera footage widely circulated on social media appeared to capture two of the blasts. In one clip a huge ball of flame erupts at an entrance to the terminal building, scattering terrified passengers.
Another video shows a black-clad attacker running inside the building before collapsing to the ground -- apparently felled by a police bullet - and blowing himself up.
The attack came just as Turkey, which had found itself increasingly friendless on the international stage, begins rebuilding relations with Israel and Russia.
It follows coordinated IS suicide bombings at Brussels airport and a city metro station in March that left 32 people dead.
Istanbul targeted: Bomb attack on police kills 11 in Turkey
An AFP photographer saw bodies covered with sheets at the terminal, where bullet holes peppered the windows and shattered glass was strewn on the floor, along with abandoned luggage.
Otfah Mohamed Abdullah was checking her luggage in when she saw one of the attackers pull out a hidden gun.
"He's shooting up, two times, and he's beginning to shoot people like that, like he was walking like a prophet," she told AFPTV.
"Everybody started running in different directions when the shooting started. I hid under the counter where I was standing and a couple of the ground staff did the same," South African university administrator Judy Favish told eNCA television in her home country.
Favish said she and other travellers were ushered to the basement before emerging about two hours later.
"We walked through the airport and saw debris and blood. It was just chaos. It was horrible."
Analyst Soner Cagaptay, director of the Turkish Research Programme at The Washington Institute, described it as a "symbolic attack against the heart of Turkey".
"If this Islamic State is indeed behind this attack, this would be a declaration of war. Turkey's vengeance will come down like rain from hell on the Islamic State."
The attack prompted the suspension of all flights at the airport, but operations were resuming on Wednesday with some delays.
There was chaos at the nearest hospital in Istanbul's Bakirkoy district, which was inundated with relatives desperate for news of loved ones.
Brussels airport, the scene of suicide bombings just months ago, tweeted condolences, saying: "Our thoughts are with the victims of the attacks at @istanbulairport.".
Our thoughts are with the victims of the attacks at @istanbulairport. We wish them, their relatives & all airport staff strength & courage.
— Brussels Airport (@BrusselsAirport) June 28, 2016
The US and French consulates warned people to stay away from the area.
Erdogan met his prime minister and military chief after news of the carnage broke.
"We urge the world, especially Western countries, to take a firm stand against terrorism," Erdogan said in a statement.
"Despite paying a heavy price, Turkey has the power, determination and capacity to continue the fight against terrorism until the end."
Istanbul, a major tourist hub that is home to some 15 million people, has suffered a series of attacks in the past year, including a bombing in the heart of the tourist district that killed a dozen German visitors and was blamed on IS.
Two months later, three Israelis and an Iranian were killed in a bomb attack on the city's main Istiklal shopping street, also blamed on IS.
A blast on the tarmac at Istanbul's other international airport, Sabiha Gokcen, killed a cleaner in December.
Turkey has been hit by at least five attacks blamed on IS jihadists, including a blast in Ankara in October 2015 that left over 100 dead, the worst in the country's modern history.
The Kurdistan Freedom Falcons (TAK) - seen as a splinter group of the rebel Kurdistan Workers' Party (PKK) - also claimed a car bombing in Istanbul in June that killed 11, and warned foreign tourists they would not be safe in Turkey.
It said its action was to avenge a sustained offensive against the outlawed PKK in southeastern Turkey following the collapse of a ceasefire last year.
Hundreds of members of the Turkish security forces have since been killed in PKK attacks.
COMMENTS (47)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ