Turkey, a NATO member with a religious-Sunni, right-wing political base, is setting a dangerous trap for President Obama.

The United States cannot let itself be drawn into war with Syria by virtue of its formal alliance with Turkey, through NATO. Already, Turkey has been shelling Syria. For more than a year, Turkey’s Prime Minister Erdogan has been itching for a fight with Syria, and now—following a minor incident involving a single mortar shell that crossed the Syrian-Turkish border—he may get one.

If he does, the United States has to stay out of it.

Weirdly, it isn’t even known who fired the mortar, which landed in a Turkish village. As The New York Times reports: “It was unclear if the mortar that struck Turkey was fired by government forces or by rebels fighting to oust the government of President Bashar al-Assad of Syria.”

The problem for Obama is, if he backs Turkey in what is looking increasingly like Turkish nationalist frenzy, a combination Sunni-Muslim solidarity with Syria’s Muslim Brotherhood rebels and old Ottoman Empire wistfulness, he’ll find himself involved in yet another Middle East war with no end. And if he doesn’t, count on Mitt Romney to accuse him of abandoning a NATO ally.

Various NATO and European circles are calling for restraint, including Catherine Ashton of the EU and the British foreign secretary, William Hague. But the Turks don’t seem ready to restrain themselves, even though their allies in the Syrian civil war are more and more overt terrorists. The horrific bombings in Aleppo this week that left scores of Syrians dead have now been claimed by a partner of Al Qaeda in Syria, a little-known grouplet called Jabhet al-Nusra. The Syrian revolt is increasingly marked by outright terrorism, and extremist Islamists are all over the place. (In contrast, the mainstream part of the revolt seems to be led by the Syrian branch of the Muslim Brotherhood, which is far more extreme and less moderate than, say, the branch that runs Egypt today.)

Worryingly, US rhetoric is not exactly emphasizing restraint. Hillary Clinton said she was “outraged” by the minor mortar attack into Turkey, which could have been shrugged off, and she said that the situation was “very, very dangerous.” The Pentagon spokesman called it “yet another example of the depraved behavior of the Syrian regime.” And, despite the relatively restrained comments from some NATO members, NATO itself seemed to activate its formal alliance mechanism, pledging “to stand by Turkey,” adding that it “demands the immediate cessation of such aggressive acts against an ally, and urges the Syrian regime to put an end to flagrant violations of international law.” Or else?

A statement from Clinton’s office expressed solidarity with Turkey, in the NATO context, reports The Cable:

She pledged the United States’ strong support for the sovereignty and territorial integrity of our Turkish ally and endorsed the statement in the North Atlantic Council this evening, which condemned Syria’s aggression and called for Alliance solidarity with Turkey. She also made clear that the United States would support Turkey in the United Nations Security Council as well.

And, thanks to The Cable, Clinton’s full statement:

We are outraged that the Syrians have been shooting across the border. We are very regretful about the loss of life that has occurred on the Turkish side,” Clinton said. “But this also comes down to a regime that is causing untold suffering to its own people, solely driven by their desire to stay in power, aided and abetted by nations like Iran that are standing firmly beside the Assad regime regardless of the damage, the loss of life, the violence that is happening both inside of Syria and now increasingly across Syria’s borders with their neighbors. It’s a very, very dangerous situation.

Russia, which has strongly warned against foreign intervention in Syria, has urged Damascus to say that the attack on Syria was an accident. Said Foreign Minister Lavrov, who’s in Pakistan:

Through our ambassador to Syria, we have spoken to the Syrian authorities who assured us…that what happened at the border with Turkey was a tragic accident, and that it will not happen again. We think it is of fundamental importance for Damascus to state that officially.

Meanwhile, the Turks are blustering and the Turkey’s parliament has authorized more strikes.

For a hint on how Romney might handle this situation, read Robert Dreyfuss’s last post on the candidate’s fearmongerng Op-Ed in the Wall Street Journal.