Suicide attackers armed with guns and bombs killed 41 people and wounded scores at Istanbul's busy Ataturk Airport. The government said Islamic State extremists were believed responsible.
Turkish authorities were still piecing together how the triple suicide attack happened. Forty-one people died excluding the bombers, who arrived in a taxi and blew themselves up after coming under fire, according to the government.
A Turkish official said authorities are going through surveillance footage and interviewing witnesses to establish a preliminary timeline and details of the attack. "It is a jigsaw puzzle" said the official.
There were conflicting reports on where at the terminal the attackers blew themselves up.
Earlier, the same official had said none of the attackers got past security checks at the entrance, with two detonating explosives at the international arrivals terminal and the third in the parking lot. The official spoke on condition of anonymity in line with government protocol.
But the HaberTurk newspaper reported that one attacker blew himself up outside the terminal, and two others opened fire near the X-ray machines. One report said attacker was shot at while running amid fleeing passengers, then blew himself up at the exit. The third attacker went up one level to the international departures terminal, was shot by police and detonated his explosives, according to the report.
Airport surveillance video posted on social media appeared to show the moment of one explosion, a huge ball of fire, and passengers fleeing. Another appeared to show an attacker, felled by a gunshot from a security officer, blowing himself up seconds later.
"So, what can we think? We cannot think anything," said Ali Batur, whose brother died. "A terror attack might happen everywhere, it happens everywhere. This terror trouble is also in our country. If God permits, we will get over this in unity and solidarity."
As dawn broke over the destroyed terminal, workers began removing debris. An information board inside showed about one-third of scheduled flights were cancelled, and a host of others were delayed.
Earlier, the hundreds of passengers who fled the airport in fear were left sitting on the grass outside. Several ambulances drove back and forth, and security vehicles surrounded the scene.
The Istanbul governor's office said 41 people were dead, among them 13 foreigners, including three dual-nationals.
It said more than 230 people were wounded.
Turkish Prime Minister Binali Yildirim said it appeared that the Islamic State group was responsible. The extremist group has threatened Turkey repeatedly.
"Even though the indications suggest Daesh, our investigations are continuing," Yildirim said, using Arabic shorthand for Islamic State.
Prime Minister Justin Trudeau said on Twitter that Canada "strongly condemns tonight's deadly attack in Turkey," adding that his "thoughts and prayers" are with the victims as "we stand with our allies against terrorism."
Global Affairs Canada is saying that Canadians have been affected by the attack, although it could not provide details about any Canadians injured.
"The Emergency Watch and Response Centre and our offices in Ankara and Istanbul are closely monitoring the situation. Consular officials are in touch with Canadian citizens in Turkey who have been affected by this incident and stand ready to provide consular assistance as needed," said Global Affairs Canada spokesperson Austin Jean on Wednesday morning.
Canadian citizens in Istanbul who require emergency assistance can contact the Consulate of Canada in Istanbul at 90 (212) 285-9700 or call Global Affairs Canada's 24/7 Emergency Watch and Response Centre at 1-800-387-3124. Friends and relatives of Canadian citizens known to be in the area can also contact the toll free number or send an e-mail to firstname.lastname@example.org.
Turkey has suffered a series of attacks, and the increasing frequency and scale have scared away visitors and devastated the economy, which relies heavily on tourism. The country is a key partner in the U.S.-led coalition against Islamic State and a NATO member.
Turkey shares long, porous borders with Syria and Iraq, war-torn countries where IS controls large pockets of territory. Authorities have blamed IS for several major bombings over the past year, including on the capital Ankara, as well as attacks on tourists in Istanbul.
The government has stepped up controls at airports and land borders and deported thousands of foreign fighters, but has struggled to tackle the extremist threat while also conducting security operations against Kurdish rebels, who have also been blamed for some recent deadly attacks.
The devastation at Istanbul's airport follows the March attack on the Brussels airport, where two suicide bombings ripped through check-in counters, killing 16 people. The Islamic State group claimed responsibility for that attack, as well as a subsequent explosion at a Brussels subway station that killed 16 more people.
Belgian Prime Minister Charles Michel said on Twitter: "Our thoughts are with the victims of the attacks at Istanbul's airport. We condemn these atrocious acts of violence."
Turkish airports have security checks at both the entrance of terminal buildings and then later before entry to departure gates.
Judy Favish, a South African who spent two days in Istanbul as a layover on her way home from Dublin, had just checked in when she heard an explosion followed by gunfire and a loud bang.
She said she hid under the counter, then passengers were ushered to a basement cafeteria where they were kept for more than an hour before being allowed outside.
Two South African tourists, Paul and Susie Roos from Cape Town, were due to fly home at the time of the explosions.
"We came up from the arrivals to the departures, up the escalator when we heard these shots going off," Paul Roos said. "There was this guy going roaming around, he was dressed in black and he had a handgun."
The prime minister called for national unity and "global co-operation" in combatting terrorism.
"This (attack) has shown once again that terrorism is a global threat," Yildirim said. "This is a heinous planned attack that targeted innocent people."
He suggested that the attack was linked to what he said was Turkey's success against Kurdish rebels, as well as steps Ankara took Monday toward mending strained ties with Israel and Russia.
Yildirim said there were no immediate indications that other attackers were at large.
Dozens of anxious friends and relatives waited early Wednesday outside Istanbul's Bakirkoy Hospital.
"You can hear that people are wailing here," said Serdar Tatlisu, a relative of a victim. "We cannot cope any more, we can't just stay still. We need some kind of solution for whatever problem there is."
Turkey is beset by an array of security threats, including from ultra-left radicals, Kurdish rebels demanding greater autonomy in the restive southeast, and IS militants.
On Jan. 12, an attack that Turkish authorities blamed on IS claimed the lives of a dozen German tourists visiting Istanbul's historic sites. On March 19, a suicide bombing rocked Istanbul's main pedestrian street, killing five people, including the bomber, whom the authorities identified as a Turkish national linked to IS.
Last October, twin suicide bombings hit a peace rally outside Ankara's train station, killing 102 people. There was no claim of responsibility but Turkish authorities blamed the attack on a local Islamic State cell.
Istanbul's Ataturk Airport was the 11th busiest airport in the world last year, with 61.8 million passengers, according to Airports Council International. It is also one of the fastest-growing airports in the world, seeing 9.2 per cent more passengers last year than in 2014.
With files from Globe staff and The Canadian Press