Suicide bombers attacked the bustling international terminal of Turkey’s largest airport Tuesday — killing at least 36 people and wounding at least 140 in an attack officials believe is the work of ISIS.

Two of the terrorists first opened fire at the entrance of the packed Ataturk Airport building in Istanbul — and then detonated their explosive vests when police shot back at them near a security checkpoint at about 10 p.m. local time, an official said.

Another explosion occurred just outside the terminal on the pavement, perhaps a third terrorist, according to CNN Turk. There may have been a fourth attacker.

Both US and Turkish officials said the strike appeared to be the work of ISIS, though the group had not claimed responsibility.

“A terrorist at the international terminal entrance first opened fire with a Kalashnikov and then blew himself up,” said Turkey’s Justice Minister, Bekir Bozdag.

An airport employee told NBC News he saw a cop heroically wrestle one of the bombers to the ground — but that man ultimately detonated his explosive vest.

“There was a huge explosion, extremely loud,” said Ali Tekin, who was waiting at the arrivals wing when bombs went off. “The roof came down. Inside the airport it is terrible, you can’t recognize it, the damage is big.”

The airport is one of the three busiest in Europe, with 61.8 million passengers traveling through it last year.

Dramatic videos and photos show blood-soaked travelers frantically running through the hallways of the airport as others seek cover in shops.

Warning: Graphic images

“A man ran up and ripped open his jacket, showing a bomb vest,” witness Veysel Allay told The Telegraph. “I ran before he did anything.”

Hundreds of passengers poured out of the airport after the attack as dozens of ambulances arrived on scene to ferry away the wounded. Some travelers were taken to a cafeteria in the airport’s basement, where they hid out for more than an hour.

“Passengers [were] running everywhere, scurrying. I was hiding,” a witness told national broadcaster TRT.

Paul Roos, a 77-year-old tourist visiting from Cape Town, South Africa, said he was preparing to fly home with his wife before the attack. He came upon one of the terrorists, who was holding a gun, just after leaving the arrivals area.

“He was just firing at anyone coming in front of him. He was wearing all black. His face was not masked. I was 50 meters away from him,” Roos said.

“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.

“He turned around and started coming toward us,” Roos continued. “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.”

An unconfirmed video posted on Twitter purports to show one of the attackers getting gunned down by a security guard.

Security-camera footage shows an assailant collapsing on the ground inside the terminal after being shot. Moments later, he ­appears to activate a suicide vest, filling the room with fire.

Iraqi-American journalist Steve Nabil was ready to fly to New York City after his honeymoon when the chaos broke out.

“We just left the airport. My wife was injured during the attack. We were face to face with the attacker while he sprayed,” Nabil tweeted.

“I ran back, got my wife, pulled her to store, broke in and waited in terror while he was shooting outside the store. We barely made it.”

A German woman named Duygu said she threw herself onto the floor after hearing an explosion.

“Everyone started running away,” she said. “Everywhere was covered with blood and body parts. I saw bullet holes on the doors.”

The US Consulate was trying to determine if any Americans were among the victims, according to a State Department tweet.

As a precaution, the Port Authority beefed up patrols at New York-area airports.

On Monday, a travel warning had been issued by the State Department urging Americans to “avoid travel to southeastern Turkey” after “increased threats from terrorist groups.”

Ataturk Airport is in the country’s northwest region.

Flights between the United States and Istanbul were suspended Tuesday evening.

The bombing was the latest in a string of terror attacks that have rocked Turkey.

In March, a bomb-laden car slammed into a bus in Turkey’s capital of Ankara, killing 37 people. Kurdish militants claimed responsibility for that attack.

Turkish President Recep Tayyip Erdogan said in a statement that the latest attack — which occurred during the Muslim holy month of Ramadan — “shows that terrorism strikes with no ­regard to faith and values.”

“Turkey has the power, determination and capacity to continue the fight against terrorism until the end,” he said.

The United States condemned the attack.

“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,” White House spokesman Josh Earnest said in a statement.

With Post Wire Services