Even if the “moderate Islam” conspiracy theorists were off base, it is true that ever since Prime Minister Tayyip Erdogan came to power in 2003, Washington has viewed Turkey as a simplistic duality: pious masses led by the Justice and Development Party against the small secular elite and the military. As Americans banked on the government’s electoral majority, they lost touch with the rest of the population.

No doubt President Obama was briefed, just as Secretary of State Hillary Clinton was before she came here last month, to never speak of “moderate Islam.” And he hasn’t so far. In fact, he has done the opposite. The new American president  whose dark skin and Muslim middle name of Hussein have made him a folk hero here  went out of his way on Monday to acknowledge Turkey’s plurality in all its colors, and telling Europe that in welcoming Turkey it would gain “by diversity of ethnicity, tradition and faith.”

Mr. Obama’s visit to Ankara was a carefully calibrated series of messages and symbolic gestures that spoke to Turkey’s different segments. He met with the government leadership as well as opposition leaders from secular, nationalist and Kurdish parties. He pledged to support “Ataturk’s vision of Turkey as a modern and prosperous democracy," as he wrote in the guestbook at the mausoleum of the founder of secular Turkey.

In our eternal identity crisis, we Turks have lately been thinking only in opposites  that you are either secular or religious, Kurd or Turk, European or Middle Eastern. It took a young foreign leader on his first visit here to remind us that we are all of those things, and much more.

It wasn’t all roses, of course. In his speech to Parliament, President Obama urged Ankara to face up to the mass killings of Armenians in 1915, something most voters here object to.