The website of Turkey’s Ministry of Foreign Affairs acknowledges that NATO has played a “central role” in the country’s security and insists that Turkey, which became a member in 1952, “attaches utmost importance” to it. Yet Turkey’s commitment to the alliance has never seemed more ambivalent than it does now.

On crucial issues — from fighting the Islamic State to fielding integrated defense systems, which share information and operate together, to standing firm against Russian aggression in Ukraine — President Recep Tayyip Erdogan and his government either are not cooperating fully or are acting in outright defiance of NATO’s priorities and interests. Add the fact that Turkey under Mr. Erdogan has become increasingly authoritarian, and it becomes apparent that the country is drifting away from an alliance whose treaty says it is “founded on the principles of democracy” as much as defense.

For months, the Western allies have pressured Turkey to close its porous border, which has allowed thousands of jihadists to cross into Syria to join the Islamic State, also known as ISIS or ISIL, and has enabled ISIS to smuggle in weapons and smuggle out oil on which it relies for revenue.

Although the Turkish government has taken some steps to make transit harder, it has been unwilling, or unable, to stem the flow, according to Tim Arango and Eric Schmitt’s reporting in The Times. One smuggler said that while his job has become more difficult, sometimes the Turkish border guards look the other way.