Police fired shots to try to stop two of the attackers just before they reached a security checkpoint at the arrivals hall at Ataturk airport, Europes third-busiest, but they blew themselves up, a second Turkish official said.
Istanbul Governor Vasip Sahin told reporters that 28 people had been killed and around 60 wounded. Several witnesses reported two explosions but Sahin said authorities believed there may have been three suicide bombers.
"There was a huge explosion, extremely loud. The roof came down. Inside the airport it is terrible, you cant recognise it, the damage is big," said Ali Tekin, who was at the arrivals hall waiting for a guest when the attack took place.
A German woman named Duygu, who was at passport control entering Turkey, said she threw herself onto the floor with the sound of the explosion. Several witnesses also reported hearing gunfire shortly before the attacks.
"Everyone started running away. Everywhere was covered with blood and body parts. I saw bullet holes on the doors," she said outside the airport.
There was no immediate claim of responsibility for the attack, the latest in a string of suicide bombings this year, but the Dogan news agency said initial indications suggested Islamic State may have been responsible, citing police sources.
A Turkish official said it was too soon to assign blame.
The attack bore some similarities to a suicide bombing by Islamic State militants at Brussels airport in March which killed 16 people. A coordinated attack also targeted a rush-hour metro train, killing a further 16 people in the Belgian capital.
Speaking in parliament earlier, Turkish Justice Minister Bekir Bozdag said initial information suggested one attacker had initially opened fire with an automatic rifle.
"According to information I have received, at the entrance to the Ataturk Airport international terminal a terrorist first opened fire with a Kalashnikov and then blew themself up," he said in comments broadcast by CNN Turk.
The state-run Anadolu agency said six of those wounded had sustained serious injuries.
Ataturk is Turkeys largest airport and a major transport hub for international travellers. Pictures posted on social media from the site showed wounded people lying on the ground inside and outside one of the terminal buildings.
A helicopter buzzed overhead as police evacuated the building. Dozens of passengers walked back down access roads with their luggage, trying to hail cabs. The U.S. embassy urged U.S citizens to avoid the area.
A witness told Reuters that security officials prevented his taxi and other cars from entering the airport at around 9:50 pm (1850 GMT). Drivers leaving the terminal shouted "Dont enter! A bomb exploded!" from their windows to incoming traffic, he said.
Television footage showed ambulances rushing to the scene.
One witness told CNN Turk that gunfire was heard from the car park at the airport. Taxis were ferrying wounded people from the airport, the witness said.
The head of Red Crescent, Kerem Kinik, said on CNN Turk that people should go to blood donation centres and not hospitals to give blood and called on people to avoid main roads to the airport to avoid blocking path of emergency vehicles.
Authorities halted the takeoff of scheduled flights from the airport and passengers were transferred to hotels, a Turkish Airlines official said. Earlier an airport official said some flights to the airport had been diverted.
In the United States, the Port Authority of New York and New Jersey reacted to the explosions by putting armed, high-visibility patrols at the three main airports in the New York metropolitan region.
Turkey has suffered a spate of bombings this year, including two suicide attacks in tourist areas of Istanbul blamed on Islamic State, and two car bombings in the capital, Ankara, which were claimed by a Kurdish militant group.
In the most recent attack, a car bomb ripped through a police bus in central Istanbul during the morning rush hour, killing 11 people and wounding 36 near the main tourist district, a major university and the mayors office.
Turkey, which is part of the U.S.-led coalition against Islamic State, is also fighting Kurdish militants in its largely Kurdish southeast.
One person was killed on Dec. 23, 2015, when an explosion hit Istanbuls second airport, Sabiha Gokcen, located on the Asian side of the city. That attack was claimed by a Kurdish militant group.(*)