Although both countries once coddled dictators — Mr. Sarkozy allowed Col. Muammar el-Qaddafi to occupy central Paris and pitch a tent near the Élysée Palace in 2007, and Prime Minister Recep Tayyip Erdogan accepted the Qaddafi international prize in 2010 — Turkey threw its support behind the Arab revolts early on, winning fans across the region.

Until it backed Libya’s rebels last year, France had bet on the enduring nature of dictatorships and never forged ties with the democratic forces opposing them; Turkey did so, perhaps unwittingly, by expanding its soft power into Arab countries, building business networks and founding state-of-the-art high schools, run by the Sufi Islam-inspired Gulen movement, to educate the future Arab elite. Now, the Arab Spring is providing Turkey with an unprecedented opportunity to spread its influence further in newly free Arab societies.

As France’s business ties with the old secular elite fray, its influence is waning. It remains a military and cultural power, and will continue to attract Arab elites, even Islamist ones, seeking weapons and luxury goods. However, France will find it hard to market its brand of secularism across the region or match Turkey’s grass-roots business networks, especially in Syria, Lebanon and Iraq, where Turkey already has significant clout.

EVEN so, the road ahead will be rocky. Turkey ruled the Arab Middle East until World War I, and it must now be careful about how its messages are perceived there. Arabs might be drawn to fellow Muslims, but like the French, the Turks are former imperial masters. Arabs are pressing for democracy, and if Turkey behaves like a new imperial power, this approach will backfire. At a recent conference at Zirve University, a gleaming private school in Gaziantep financed by the local businesses that have made Turkey a regional economic powerhouse, Arab liberals and Islamists from various countries disagreed on most matters but agreed on one thing: that Turkey is welcome in the Middle East but should not dominate it.

In September, when Mr. Erdogan landed at Cairo’s new airport terminal (built by Turkish companies), he was warmly met by joyous millions, mobilized by the Muslim Brotherhood. However, he soon upset his pious hosts by preaching about the importance of a secular government that provides freedom of religion, using the Turkish word “laiklik” — derived from the French word for secularism. In Arabic, this term loosely translates as “irreligious.” Mr. Erdogan’s message may have been partly lost in translation, yet the incident illustrates the limits of Turkey’s influence in countries that are far more socially conservative than it is.

Turkey may have the upper hand in soft power, but France has more hard power, as the recent war in Libya and its veto power at the United Nations make clear. And despite Turkey’s phenomenal growth since 2002, the French economy is over twice the size of Turkey’s, and France is still dominant in North Africa.

Turkey’s relative stability at a time when the region is in upheaval is attracting investment from less-stable neighbors like Iran, Iraq, Syria and Lebanon. Ultimately, political stability and regional clout are Turkey’s hard cash, and its economic growth will depend on both.