Rebellion has shaken Turkey since May 31: Is it comparable to the Arab upheavals that overthrew four rulers since 2011, to Iran's Green Movement of 2009 that led to an apparent reformer being elected president last week, or perhaps to Occupy Wall Street, which had negligible consequences?

The unrest marks a deeply important development with lasting implications. Turkey has become a more open and liberal country, one in which leaders face democratic constraints as never before. But how much it changes the role of Islam in Turkey depends primarily on the economy.

China-like material growth has been the main achievement of Prime Minister Tayyip Erdogan and his AKP party. Personal income has more than doubled in the decade that he has been in power, changing the face of the country. As a visitor to Turkey since 1972, I have seen the impact of this growth in almost every area of life, from what people eat to their sense of Turkish identity.

That impressive growth explains the AKP's increased share of the national vote in its three elections, from 34 percent in 2002 to 46 percent in 2007 to a shade under 50 percent in 2011. It also explains how, after 90 years of the military serving as the ultimate political player, the party was able to subdue the armed forces.

At the same time, two vulnerabilities have become more evident, especially since the June 2011 elections, jeopardizing Erdogan's continued domination of the government.

Dependence on foreign credit. To sustain consumer spending, Turkish banks have borrowed heavily abroad, especially from supportive Sunni Muslim sources. The resulting account deficit creates such a need for credit that the private sector alone needs to borrow $221 billion in 2013, nearly 30 percent of the country's $775 billion GDP. Should money stop flowing into Turkey, the party (pun intended) is over, possibly leading the stock market to collapse, the currency to plunge, and the economic miracle to come to a screeching halt.

Erdogan's sultan-like understanding of his democratic mandate. The prime minister sees his election -- especially the one in 2011, when the AKP won half the popular vote -- as a carte blanche to do as pleases until the next vote. He indulges his personal emotions (recall his 2009 confrontation with Shimon Peres), meddles in the tiniest matters (his mandate on the use of a city park prompted the current turmoil), acts like a social engineer (telling married couples to bear three or more children), involves Turkey in an unpopular foreign adventure (Syria), and demonizes the half of the electorate that did not vote for him (calling them beer-guzzlers who copulate in a mosque). This attitude has won the fervent support of his once-downtrodden constituency but has also brought the fury of growing numbers of Turks who resent his authoritarianism as well as the criticism of Europe leaders. German Chancellor Angela Merkel pronounced herself "appalled" by the recent police crackdown.

These two weaknesses point to the economy for the future of Erdogan, the AKP, and the country. Should Turkey's finances weather the demonstrations, the Islamist program at the heart of the AKP's platform will continue its advance, if more cautiously. Perhaps Erdogan himself will remain leader, even as the country's president with newly enhanced powers next year, or perhaps his party will tire of him and -- as happened to Margaret Thatcher in 1990 -- push him aside in favor of someone who can carry out the same program without provoking so much hostility.

But if "hot money" flees Turkey, if foreign investors go elsewhere, and if Persian Gulf patrons cool on the AKP, then the demonstrations could end AKP rule and rupture the drive toward Islamism and the application of Islamic law. Infighting within the party, especially between Erdogan and President Abdullah Gül, or within the Islamist movement, especially between the AKP and Fethullah Gülen's powerful movement, could weaken the Islamists. More profoundly, the many non-Islamist voters who voted for the AKP's sound economic stewardship might abandon the party.

Payroll employment is down by 5 percent. Real consumer spending in first quarter of 2013 fell by 2 percent from 2012. Since the demonstrations started, the Istanbul stock market is down 10 percent, and interest rates are up about 50 percent. To assess the future of Islamism in Turkey, watch these and other economic indicators.