Senior U.S. intelligence officials tell NBC News that there are a half-dozen pressing reasons why ISIS would choose to send three suicide bombers to attack the Istanbul airport. They say that the terror group, which has recently lost territory from its caliphate in Syria and Iraq, is sending a signal to its northern neighbor because:

A Turkish offensive against ISIS that started last July and accelerated in October, after an ISIS bombing killed more than 100 civilians in Turkey’s capital city of Ankara, the deadliest terrorist attack in Turkey’s history. Turkish bombers also began taking part in the international coalition airstrikes against ISIS targets.

Earlier this month, Turkish courts sentenced three ISIS terrorists to 10 life sentences for a March 2014 attack in Turkey. The prison sentences were the first imposed on ISIS members by Turkey.

A recent agreement between Turkey and Israel to reinvigorate relations, which had been damaged by a 2010 Israeli raid on a Gaza aid ship that killed 10 Turkish activists.

The Iraqi offensive against ISIS forces in Fallujah, which portends an even larger battle in the near future to retake a much larger prize, the city of Mosul,

Gaps in Turkish law that make it hard for the country to crack down on ISIS fighters inside its borders.

The 1000 Turkish nationals who are fighting for ISIS in Iraq and Syria, who are angry at their own government and are available for missions inside Turkish borders.

Though the Ankara government faces two active internal terrorist groups — the Kurdistan Workers’ Party (PKK) and the Revolutionary People’s Liberation Party/Front (DHKP/C), a leftist anti-NATO group that seeks the overthrow of the Turkish state — the U.S. analysts point out that ISIS activity is not only the largest threat but the most pervasive threat.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The U.S. officials, who spoke to NBC News on a not-for-attribution basis, stressed that there is an ongoing Turkish-ISIS battle inside Turkey that is occurring largely out of public sight.

Firefighters try to extinguish the flames at the scene of a car bomb detonation close to buildings of the Turkish military, in Ankara, capital of Turkey, on Feb. 17 2016. STR / EPA

Turkey has increased its surveillance and apprehension of possible fighters attempting movement or operations in the country. Turkey, U.S. officials say, is the most important chokepoint in the flow of both indigenous ISIS and foreign terrorist fighters. ISIS itself, U.S. intelligence assesses, has aggressively increased its activity and attacks on Turkish soil in an effort to protect its most important external line of communication through the country to the battlefield in Syria and Iraq.

According to U.S. intelligence, more than 1,300 ISIS suspects have been detained by Turkish police in the past year, some 350 of whom were arrested. Nearly all were Turkish nationals. And since the July offensive began, Turkish military units along the Syrian border have apprehended more than 150,000 individuals, mostly refugees, attempting to cross illegally. Of the 150,000, most were refugees, but about 1.6 percent were deemed terror suspects. Some were arrested and some were not allowed to cross. Turkey also deported 2,337 suspected foreign terrorist fighters from 85 countries caught at the border in 2015, according to the U.S. State Department.

The Istanbul airport attacks, U.S. officials stress, are not just tied to the domestic battle between Ankara and the so-called Islamic state, but also need to be understood in terms of internal Turkish politics.

Turkish President Recep Tayyip Erdogan said last year that the PKK and its Kurdish affiliates in Syria were more of a threat to Turkey than the Islamic State, an opinion shared by the Turkish Army. But other Turkish officials, U.S. sources say, strongly disagree with Erdogan’s assessment. U.S. intelligence officials estimate that there are approximately 4,000 to 5,000 PKK members, most located in northern Iraq, while ISIS fighters and sympathizers number in the tens of thousands.

Turkey also faces some difficult internal legal impediments to international counter-terrorism, according to U.S. sources. Legislation defines terrorism narrowly as a crime targeting the Turkish state or citizens, and not all courts have interpreted the term more to include all activities associated with foreign terrorist fighters transiting Turkey, including ISIS facilitation networks.

Turkish rescue services outside Ataturk International airport on Tuesday night. Emrah Gurel / AP

Some are even invoking the specter of Pakistan in Turkey’s tendency to deport ISIS fighters from other countries while tolerating the terror group’s support networks on its own soil.

A senior U.S. military official who has been involved in the anti-ISIS campaign since its beginning in 2014 warns that the lesson from Istanbul might be that the American press and political leaders not digest their own propaganda about success against ISIS.

“The conventional wisdom is always that attacks are staged in an effort to assert a narrative of victory in the face of losses of territory in Iraq and Syria,” the official says. “Meanwhile, our self-congratulating pats on the back ignore that this global insurgency consistently gains strength and sophistication.”