For much of last year, Turkey’s economy seemed almost on top of the world. In May, as huge construction projects moved ahead, Ankara paid off its remaining debt to the International Monetary Fund, ending what seemed to many Turks a long history of humiliation. The country received an encouraging investment-grade rating, and foreign funds poured in like never before.

In a flurry of appearances that month, Prime Minister Recep Tayyip Erdogan feted record-low interest rates, a slide in the unemployment rate from 15 percent to nine percent since 2009, and, above all, the growth that Turkey has enjoyed “due to reforms carried out over the past ten years.” He underlined his point -- and his driving ambition -- on an exuberant visit to Washington. Addressing the U.S. Chamber of Commerce, he noted that when his Islamist-rooted Justice and Development Party (AKP) came to power in 2002, at least 20 other economies were bigger than Turkey’s in terms of dollar output. “Now, we are 17th,” he exulted, “and in due course, we are going to be among the ten largest economies.”

The Turkish economy has indeed come a long way during Erdogan’s decade in office, propelling Ankara’s ascent to greater global prominence. In the late 1990s, Turkey was running 90 percent inflation and attracting almost no foreign investment. As recently as 2002, Turkey was using up almost 90 percent of its tax revenues to pay the interest on its debt. Today, these problems have all but disappeared.

But the optimism of May has since faded. Turkey, like many other developing countries, has found itself facing skittish markets, volatile exchange rates, political unrest, and an uncertain outlook. The picture of Turkey today is less flattering but more revealing than before, displaying both the promise and the perils of being an $800 billion emerging economy.

Turkey is still on track to grow faster than much of the industrialized world in the coming years. In October, Jim Yong Kim, the president of the World Bank, hailed the country as “an inspiration to many developing countries.” But the fact remains that Turkey’s success could yet unravel. To live up to its economic potential, Turkey will have to overcome two main challenges: its reliance on fickle foreign funds and the intrusion of heavy-handed politics into its economic life.

SEEDS OF SUCCESS

The seeds of Turkey’s success this century lie in the failure of the period that immediately preceded it. After the liberalizing reforms of Turgut Ozal, the visionary prime minister of the 1980s, who opened up what had been a perennially closed economy, the 1990s were a wretched decade, punctuated by economic crisis, brutal episodes in the country’s Kurdish conflict, a de facto coup, and a devastating earthquake. This was a time when the lack of foreign funds, often the result of spikes in U.S. Treasury yields, could cause economies to seize up, and Turkey was hardly alone in its misery. During these years, macroeconomic shocks also hit Mexico, Russia, and Southeast Asia.

For Turkey, this sorry period came to an end just after a 2001 banking crisis, when Finance Minister Kemal Dervis, with the cooperation of the International Monetary Fund, laid the groundwork for success. Ankara pruned back its spending, brought inflation under control, introduced a floating exchange rate, restructured the country’s banks, and granted more independence to the central bank and regulators. When the AKP took over in 2002, it stuck to this template, which paid off as Turkey’s discussions with the European Union progressed. The prospect of EU membership -- negotiations started in 2005 -- opened the floodgates for foreign direct investment.

A boom in infrastructure development and construction added to the good times. Since the outset of Erdogan’s tenure, the country’s highway network has been expanded by more than 10,000 miles. The number of airports has doubled, to 50, and Turkish Airlines now flies to more than 100 countries, more than any other carrier in the world. New, upscale housing complexes and shopping malls seem to flank every major city.

Turkey’s once-fragile banking sector was strong enough to get through the 2008 financial crisis with only a brief, albeit deep, recession. Then, as the United States unleashed an unprecedented monetary stimulus, Turkey floated on a sea of money. Growth roared ahead: the economy expanded by 9.2 percent in 2010 and 8.8 percent in 2011, although higher interest rates slowed the overheating economy to 2.2 percent growth in 2012.

HOOKED ON FOREIGN FUNDS

Yet for all its strengths, Turkey remains vulnerable. Its first major problem is its dependence on foreign funds. The country suffers from structural weaknesses that have been obscured by the waves of money that have been crashing in because of loose monetary policies elsewhere. It shares this problem with other developing countries, including Brazil and Indonesia, whose governments have grown lazy about reforms and let the quantitative-easing-induced good times roll. This dependence has become particularly worrying since May, when the U.S. Federal Reserve floated the possibility of reining in its monetary stimulus, a step that would likely reduce the funds that have been pouring into emerging economies. For Turkey, the talk of a tighter U.S. monetary policy left a particular mark: amid other troubles, yields on the country’s benchmark two-year bonds doubled.

Turkish markets were sensitive for one reason above all: a lack of balance in the country’s economy. Even though Turkey was expected to have grown by only 3.5 to 4.0 percent in 2013 -- below the level needed to create enough jobs for new entrants into the work force -- the country’s current account deficit stands at about seven percent of GDP. Despite Turkey’s enormous appeal for tourists (36 million arrived in 2012), a manufacturing base well positioned for exports, a $62 billion agricultural sector, a tradition of trading, and ambitions to become an energy hub, the country still relies on domestic consumption to power its economy, and consumption has risen rapidly as savings have fallen. At present, Turkey sucks in foreign goods and relies on foreign cash to finance even lackluster economic expansion.

Making matters worse, the foreign funds that are financing Turkey’s expansion are overwhelmingly short-term investments and could be swiftly pulled out of the country. Net foreign direct investment underwrote just $7.3 billion of the country’s $56.7 billion current account deficit between August 2012 and August 2013. By contrast, five years ago, such investment -- which is intrinsically more stable than short-term portfolio funds -- financed half the deficit.

Turkish officials argue that concerns about the country’s prospects are exaggerated and emphasize that a return to a more traditional U.S. monetary policy should not be compared with traumas on the scale of the collapse of Lehman Brothers. And in fact, with the U.S. economy still troubled, the Federal Reserve has so far held off tapering back its $85 billion of monthly asset purchases: money has returned to Turkey, and the spike in Turkish bond yields has partially subsided. Most analysts predict that Turkey will continue to grow moderately, as the country’s living standards continue to converge toward those of the developed world, albeit at a slower pace than before.

But Washington’s loose monetary policy can’t last forever, and behind the Turkish economy’s ups and downs, deeper problems lurk. The rebound from the 1990s is over, the low-hanging fruit of the last decade’s reforms has been picked, and the foreign money on which the economy depends will eventually be in shorter supply. If Turkey cannot reduce its dependence on short-term foreign capital, it will not be able to grow enough, or at least not sustainably.

To a certain extent, the Turkish story so far has been less than meets the eye. The government trumpets that during its time in office, income per capita has tripled, partly a result of disparities between inflation and the exchange rate. But that growth happened early on, mostly due to the lira’s strengthening in real terms, and for the past half decade, that figure has largely been stuck around $10,500.

Then there are a whole host of structural issues that Turkey must address. Participation in the labor force remains low: only about 50 percent of working-age adults were employed in 2012, compared with an average of 68 percent across the mostly developed countries of the Organ­ization for Economic Cooperation and Development. Part of the reason for this is the fact that Turkey has overlooked the potential of half its population: according to a recent World Economic Forum report, Turkey ranks 120th out of 136 countries in terms of gender equality, and women constitute only 23 percent of the nonagricultural work force. Moreover, Turkey still lags behind the developed world in terms of educational levels. In 2011, two-thirds of Turkey’s working-age population had received only primary education or less, and according to the EU, fully 30 percent of Turkey’s young people are neither receiving education or training nor securing jobs.

The government acknowledges all these concerns. Ankara is seeking to reduce its dependence on foreign fuel, which accounts for almost all its current account deficit, by encouraging alternative sources of energy and attempting to develop Turkey as an energy hub between its oil- and gas-rich neighbors. The government has recently imposed measures to limit credit card and consumer lending to contain private consumption, and it has offered new incentives for pension schemes to encourage saving. The World Bank recently commended the “remarkable improvement” in Turkey’s education system since 2003. And the government’s finances are in admirable shape.

But the existing problems translate into economic facts of life: much of the increase in employment in recent years has come from agriculture, services, and relatively low-technology manufacturing in Anatolia. Outside the greater Istanbul area and beyond the Aegean coastline, two areas that export products such as refrigerators, washing machines, televisions, and vehicles, much of the country produces low-value-added goods, which generate less income and can be more vulnerable to competition.

THE STRONGMAN

Turkey’s other main challenge is political. The concentration of power under Erdogan was once an essential precondition for economic success. Today, however, it could make things worse, not better.

Erdogan’s chief accomplishment has been to establish the supremacy of Turkey’s elected leaders and hence the stability of government on which economic progress often rests. After 40 years in which the military ousted four governments, Turkish democracy no longer operates at gunpoint. Erdogan has pushed aside a host of opponents, some of them antidemocratic, including the military, big business, the country’s old media barons, and the judges who bent laws in a bid to weaken the AKP government. But the consequence is that the prime minister is now master of almost all he surveys, which, combined with his often erratic behavior of late, has raised important questions about the Turkish government’s transparency, rationality, and stability.

The institutions that played a role in Turkey’s success over the past decade now struggle to appear independent of the prime minister’s will. Despite the prospect of an end to the U.S. stimulus -- and inflation of about eight percent -- the central bank has kept the benchmark interest rate at 4.5 percent. Instead of increasing that rate -- what would seem the appropriate response -- the central bank has tightened the money supply with unorthodox and often confusing measures. Underlining the constraints under which the bank operates, Erdogan has long made clear his aversion to high interest rates, not least because of their role in holding back growth, and blamed an “interest-rate lobby” for stoking the Gezi Park protests last summer.

Other examples of the centralization of economic power abound. The Capital Markets Board of Turkey has named three AKP officials, including two former ministers, as directors of Turkcell, the country’s biggest cell-phone company. Last summer, Turkey’s broadcasting watchdog fined television stations that screened footage of the Gezi protests. Most conspicuous, after Erdogan denounced the Turkish conglomerate Koc Holding for sheltering protesters in one of its hotels, in July, tax inspectors accompanied by police raided the offices of several Koc subsidiaries. The case is ongoing and could fizzle out in the long run, but Turkish executives now privately complain that such an atmosphere could scare away the foreign direct investment that Turkey so desperately needs.

Indeed, the risks that Erdogan’s erratic policymaking could wreak economic damage is especially great in a country with few natural resources and little capital of its own. If the government continues to punish the media for broadcasting bad news, if big decisions come to depend on the mood of one man, and if companies fear predatory fines, Turkish growth seems unlikely to continue at the rates to which the country has become accustomed.

Little of this seems to have dawned on Erdogan himself, however: the prime minister has rarely sounded more optimistic. His government projects that Turkey will reach a per capita income of $25,000 by 2023 -- the centenary of the founding of the republic -- and realize its aim of becoming one of the world’s ten biggest economies. The latter target would require barely credible rates of growth -- 15 percent a year, according to Rahmi Koc, the patriarch of Koc Holding -- but it is in keeping with the prime minister’s monumental approach. Erdogan has also backed and begun such giant projects as a vast new airport for Istanbul, a new bridge across the Bosporus, and a new canal to run parallel to the strait. In Turkey’s current political climate, any suggestion that such projects could face financing difficulties leads to howls of outrage by the pro-government press.

As all of this implies, Turkey’s economic potential is decidedly mixed. The country remains alluring to consumer goods companies that want to sell to the country’s youthful population; it has been tried and tested as a manufacturer, and it retains a strong tradition of exporting apparel. But for other foreign investors, it presents more uncertain prospects; government officials acknowledge that foreign direct investment is considerably below where they would like it to be.

Nevertheless, Turkey still stands out amid the troubled economies of southern Europe, not to mention a Middle East in turmoil. In a November survey, the European Bank for Reconstruction and Development forecast that in 2014, Turkey would grow by 3.6 percent -- less than it had previously expected, but still a higher rate than those projected for many of its neighbors. The country’s enviable geographic location and its customs union with the EU remain important competitive advantages.

ANKARA'S AMBITION

The current state of affairs may not necessarily endure. Optimists argue that the country will return to trend, in politics as well as economics. They note that Turkey is incomparably richer and freer than it was 15 years ago. On the economic front, if education improves and Turks save more, the country can continue to grow at an accelerated pace. And on the political front, Erdogan may change course if the drawbacks of his current approach sink in.

In fact, Erdogan might not even be at the helm of government for much longer. Erdogan has sworn not to serve another term as premier (AKP term limits prohibit it), and he has shown great interest in running for the country’s presidency -- currently a largely symbolic post -- in the first direct elections for the position, which will be held later this year. Should he do so, the current president, Abdullah Gul, may well become prime minister. And a country led by Gul could be an entirely different place. Although Gul and Erdogan are old allies who built the AKP together, in recent years, Gul has taken pains to establish himself as a more moderate alternative to his old comrade. During his address at the opening of parliament in October, Gul called for a “new growth policy” and argued that Turkey should address its low savings rate, its educational failings, and the lack of women’s participation in political and economic life, as well as find ways to make “foreign investors and our own entrepreneurs feel safe and secure.”

Whoever leads Turkey next will face strong headwinds. Few analysts predict that Turkey will face the sort of crashes that have done it so much damage in the past. But in a harsh report in September, the International Monetary Fund warned that it would be difficult for Turkey to grow by four or five percent annually -- let alone by the extraordinary levels of recent memory -- “while continuing to accumulate large external liabilities.” It predicted that without structural reform, higher interest rates, and tighter spending policies, the country would be left with an unenviable choice between sluggish growth and bouts of instability.

This is the dilemma that Erdogan faces as he seeks to continue the political and economic advances his country has made since 2002. He has often proved his critics wrong. But Erdogan can achieve his outsized ambitions only if the country and the government do everything right. And the way things currently look, that might simply be too much to expect.