President Trump had been calling Turkish President Recep Tayyip Erdoğan's bluff for more than 2 years, and some senior administration officials thought Erdoğan would never actually go through with his long-threatened Syria invasion, according to 6 sources with direct knowledge of the situation.

"I think everyone thought Erdoğan was bluffing."

— A source close to Trump

The big picture: Trump would tell Erdoğan that if he wanted to invade Syria he would have to own whatever mess ensued, according to these sources. Erdoğan would have to take care of ISIS and manage international condemnation, trouble from Capitol Hill, and the quagmire with the Kurds. And when Trump put it in such stark terms to Erdoğan, the Turkish leader would demur. Until last Sunday, that is, when he told Trump he was moving ahead with the invasion of northern Syria.

This time, Erdoğan called Trump's bluff, having waited for international forces to wipe out the ISIS caliphate.

Erdoğan's decision — which the White House cleared the way for in its Sunday night announcement, alienating and blindsiding key allies including Republican lawmakers and the Christian right — has plunged the Middle East and Trump's political standing in Washington into crisis.

Sources in Turkey have indicated that while Erdoğan was talking big, he thought Trump would restrain him, a U.S. official familiar with the details told Axios' Margaret Talev.

For example, Erdoğan did not expect — or want — a 30-km-deep (18-mile) buffer; that was assumed to be a negotiation aimed at getting something smaller.

Now Erdoğan may be in over his head and facing global condemnation and sanctions, but he got so far extended politically inside Turkey that he has had little choice but to go forward, the official said.

Behind the scenes: In phone calls and in-person meetings dating back to 2017, Trump has been effectively calling Erdoğan's bluff, according to sources who have been in the room with the two leaders and had access to their phone calls.

On one 2017 phone call, Erdoğan was complaining to Trump about the Kurdish threat on his border and told Trump he wanted to move in to take care of the Kurdish threat, per a source with direct knowledge of the call.

The source paraphrased their recollection of what Trump said on the call: "It was pretty blustery. Trump was like, 'I don't want to be there in the first place, but you know our guys are there. They don't take s--t. We're there. Maybe I don't want to be there, but if you do a border crossing and come into conflict with our guys, they are way better equipped and you don't want to do that.'" Trump's message, the source said, was "don't mess with the U.S. military."

But after conveying that threat, Trump signaled he wasn't going to keep his troops in Syria for long and was not going to be hanging around to protect the Kurds against the Turks, the source added. Trump said something to the effect of, "But you know I don't want to be there. We're there to defeat ISIS. My people tell me we are winning. ... So hang tight. But you don't want to get into a conflict with my guys," the source recalled.

Another former senior administration official, who was with Erdoğan and Trump when Erdoğan visited the White House in 2017, said Trump called the Turkish leader's bluff then, too.