Updated

The coordinated massacre at Istanbul's Ataturk Airport came into clearer focus Wednesday as officials revealed a more detailed timeline of the terror attack that killed 42 and wounded 238.

After the three attackers arrived at the Turkish transit hub via taxi on Tuesday, one of the assailants entered the terminal, began shooting people and then blew himself up near X-ray machines, officials said. During the chaos, a second attacker rushed to the departures level and detonated his explosives. The third attacker waited outside during the entire episode, blowing himself up as scared travelers frantically flooded out of the airport.

"When the terrorists couldn't pass the regular security system, when they couldn't pass the scanners, police and security controls, they returned and took out their weapons out of their suitcases and opened fire at random at the security check," Turkish Prime Minister Binali Yildirim said Wednesday.

Several U.S. airports strengthened security measures due to the carnage in Istanbul, and, adding to the tension, a terminal at JFK Airport in New York was evacuated for a brief period Wednesday when a suspicious bag was spotted. It was later determined the unattended bag posed no threat and travelers were allowed back in the terminal.

Authorities viewed ISIS as the most likely culprit in the Istanbul attack, as the Turkey assault bore hallmarks similar to the March 22 coordinated terror attacks in Brussels, in which ISIS operatives killed 32 in coordinated bombings at Zaventem airport and a nearby metro station. But ISIS had not taken credit for Tuesday's attacks, and Ankara has battled Kurdish militants as well as ISIS.

Turkish officials told The Associated Press and Reuters that ISIS was the primary suspect, however, and the Islamic State released an infographic Wednesday in which it claimed to have "covert" units in Turkey. The infographic, sent out via ISIS' Amaq news agency, was made to commemorate the two-year anniversary of the militants establishing their so-called caliphate in areas of Syria and Iraq.

A U.S. government official told Fox News that the attack fits the profile of ISIS, which has stepped up its targeting of Turkey. The official said ISIS tends to attack internationally known targets with an economic impact, such as an airport, while the Kurdish terror group PKK generally targets Turkish military and law enforcement.

"If this Islamic State is indeed behind this attack, this would be a declaration of war," Analyst Soner Cagaptay, director of the Turkish Research Program at The Washington Institute, told AFP. "Turkey's vengeance will come down like rain from hell on the Islamic State."

Of the 238 people injured in the carnage, 109 had already been discharged from the hospital Wednesday morning, The Istanbul Governor's Office said. The Turkish Health Minister said 40 people remained in intensive care.

Most of those killed were Turkish, officials said. The 14 foreign travelers killed included six Saudis, two Iraqis and citizens from China, Iran, Jordan, Tunisia, Ukraine and Uzbekistan, Reuters reported.

The assault began when one attacker blew himself up outside the Ataturk terminal, the Haber Turk newspaper reported. Two other terrorists then opened fire at a point where X-ray machines are located.

"He's shooting up, two times, and he's beginning to shoot people like that, like he was walking like a prophet," Otfah Mohamed Abdullah, who witnessed one of the attackers, told AFPTV.

One attacker was shot at while running amid fleeing passengers, then blew himself up at an exit. The third attacker went up one level to where the international departures terminal is, was shot by police and blew himself up.

A Turkish official told The Associated Press that authorities were going through CCTV footage and eyewitness statements to establish a more detailed timeline of the attack. "It is a jigsaw puzzle" said the official, who spoke on condition of anonymity in line with government protocol.

Airport surveillance video posted on social media showed the moment of one blast, a huge ball of fire, and passengers fleeing in terror. Another appeared to show an attacker, felled by a gunshot from a security officer, blowing himself up seconds later.

The recent attacks on Turkey, a key partner in the U.S.-led coalition against ISIS and a NATO member, have increased in scale and frequency. They have scared away tourists and hurt the Turkish economy, which relies heavily on tourism.

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.

As if to underscore Turkey's determination to carry on in the face of a growing threat, the airport reopened Wednesday, just hours after the dead were carried away and glass and debris were cleared.

Adam Keally, from Boston, said he heard gunfire followed by several explosions, then saw people "very badly injured."

Hevin Zini, 12, had just arrived from Duesseldorf, Germany, with her family and was in tears.

"There was blood on the ground," she told the AP. "Everything was blown up to bits... if we had arrived two minutes earlier, it could have been us."

Two South African tourists, Paul and Susie Roos from Cape Town, were at the airport and 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 told the AP. "There was this guy going roaming around, he was dressed in black and he had a handgun."

Veysel Allay, who was waiting for a friend in the arrivals terminal, told the Daily Telegraph, "A  man ran up and ripped open his jacket, showing a bomb vest. I ran before he did anything."

Jim Hyong Lee of South Korea told the Telegraph he and his family were checking in for a flight home when "we heard gunshots."

"I grabbed my family and ran," Lee said. "Someone waved us into the prayer room and hid us there until the police came."

A State Department spokesman told Fox News late Tuesday that Americans in Turkey were being urged to contact family members immediately.

Saudi Arabia's Embassy in Turkey said at least seven Saudis were injured in the attack and all were in stable condition.

U.S. and world leaders immediately offered condolences following the attack.

In the U.S., President Obama was briefed about the attack by Lisa Monaco, his homeland security and counterterrorism adviser. A statement from the White House on Tuesday condemned the attack "in the strongest possible terms."

"We remain steadfast in our support for Turkey, our NATO Ally and partner, along with all of our friends and allies around the world, as we continue to confront the threat of terrorism," the statement said.

Turkey has stepped up controls at airports and land borders and deported thousands of foreign fighters, but has struggled to tackle the threat of ISIS militants while also conducting vast security operations against Kurdish rebels, who have also been blamed for recent deadly attacks.

Turkish airports have security checks at both the entrance of terminal buildings and then later before entry to departure gates.

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 percent more passengers last year than in 2014.

Fox News' Catherine Herridge, Matt Dean and Lucas Tomlinson and The Associated Press contributed to this report.