ATHENS — The torrent of money that flooded into Greece when it joined the euro zone paid for roads, boosted wages and helped Constantine Choutlas build a major construction company. But all that cash did not build a competitive economy.

When the rest of the world discovered that and the money drained away, so did Choutlas’s business.

“You could see it wouldn’t last. The country was just borrowing money,” said Choutlas, whose Proodeftiki Technical grew into a major firm after building the athletes’ village for the 2004 Olympics. Now it has been scaled back from 1,000 employees to a mere handful.

“Nobody, nobody, nobody said let’s take a look at where we are going,” he said, jabbing a finger in the air for emphasis.

The crisis in Greece has been characterized in many ways: as an example of government profligacy and mismanagement; as a case study in bad economic policy or corruption; or, by apologists, simply as fallout from troubles rooted in the United States.

Less appreciated is what bankers, analysts and officials acknowledge was a massive market failure — the collective inability or unwillingness of investors, regulators, European officials and Greek politicians to acknowledge what was happening in the country and arrest it in real time.

That failure has pushed Greece into a five-year recession and put the entire euro zone — and in a sense the global economy — at risk. After a two-year diplomatic slog, European officials have failed to restore confidence that the currency union will not crack apart. The risks instead have widened, with Spain and Italy, the region’s third- and fourth-largest economies, under the same sort of pressure that pushed Greece into an international bailout. Government borrowing costs are on the rise. Recession has taken hold. Money is flowing out.

Greeks will vote Sunday in an election that could determine their nation’s continued membership in the euro zone and whether it follows through on the terms of an international bailout meant to keep the country afloat as it tries to overhaul its economy. The terms of the package are considered harsh, aiming to drive down wages, cut the country’s reliance on international funding and allow it to live more within its means. Cast as a choice between growth and austerity, however, the bailout is in many ways trying to rewind the excesses that euro-zone bankers and regulators themselves helped fuel.

What happened

The first decade of the euro zone, a union built on the theory that member economies would converge around common levels of productivity, living standards and financial balance, instead proved it susceptible to the same flawed assumptions that drove the U.S. housing bubble — that smart investors would recognize and guard against undue risks and that regulators would step in as needed.

“Prevailing market theory was that certain countries at the start of ‘convergence’ can and should attract capital inflows to finance it,” said Platon Monokrousos, head of financial markets research at Eurobank EFG in Athens. But instead of financing factories, infrastructure and reforms that would boost future growth, the money was channeled into “consumption and investment in broadly unproductive areas,” Monokrousos said, facts evident in Greece’s steady wage increases through the 2000s, expansion of the government labor force and overspending on the Olympics.

One government adviser noted a 10 percent jump in the number of public employees in the years before the crisis. According to International Monetary Fund reports, Greece’s public-sector wages nearly doubled between 2000 and 2010.

Still, money from Germany, France and elsewhere continued to rush in as investors ignored the issues cited by the IMF and focused instead on Greek economic growth, which was outpacing the euro average. Encouraged by regulations that considered the Greek government just as creditworthy as Germany, banks gravitated to Greek bonds that paid perhaps half a percentage point more in interest.

European regulators, meanwhile, scolded Greece for continued government deficits but largely stood aside. The country’s average 4 percent economic growth was considered a constructive example of a poorer nation catching up with its new partners in the euro — a success story, in other words, that validated the expectations set when the common currency began circulating in 2002.

It was also assumed that the currency union itself would immunize each member country against the sort of problems, for example, that racked Asia and Latin America when international capital pulled away. In the United States, individual states are protected from those sorts of crises because it is the country as a whole — the large economy, the strong reputation of the dollar and the functioning of the Federal Reserve — that attracts the money from overseas needed to fund trade and other deficits. “Imbalances” among the states are smoothed out by that, and by the relatively seamless flow of labor and capital across state lines.

What’s next

Greece exposed a key flaw in the euro zone’s design, however, namely that its new “domestic” currency still behaved like an international one, and the euro-zone economy like a collection of nations rather than an integrated market. Just as dollars could disappear from a developing nation, euros could flee Greece by the tens of billions, forcing the government and banks into near-collapse as borrowing costs that had been close to Germany’s spiked to levels more akin to that of a credit card.

That realization — and the related risk that a country might be using euros one day and less valuable drachmas the next — has all but destroyed confidence in the weaker euro-zone nations.

Data from the Bank for International Settlements illustrate what happened. Investments by foreign banks in Greece more than quintupled from December 1999, just before the exchange rate between the drachma and the euro was fixed, to the peak of the boom in 2007, growing from $53 billion to $275 billion. Those investments have since collapsed to $119 billion as of December — and probably have diminished even more as companies withdraw from the country to protect against the risk that it may leave the euro zone.

Finding a solution has not been easy. Borrowing rates in Spain crept toward unsustainable levels this week despite plans for a bailout of the country’s banking system financed through Europe’s new crisis-fighting fund. It was disturbing evidence that even the firewalls built over the past two years may not hold and that the tight ties between bank and government finances in the euro zone continue to threaten both. Italy also is showing new signs of trouble, with its government borrowing costs moving higher.

Many analysts say the crisis won’t end until euro nations take a sort of final leap — into a federation that puts the collective economic strength of all 17 countries behind each one individually — and broadens the role of the European Central Bank to include crisis financing for governments when necessary.

Opponents of such steps argue that it would be an invitation to governments to overspend, the sort of moral hazard that countries such as Germany are determined to prevent. As Greece’s experience shows, moral hazard may have been wired into the euro from the beginning, to the detriment of workers who thought their nation was coming of age economically.

Christos Eftimiou saw it from his job as a marketing official with the quasi-public Organization for the Promotion of Greek Civilization, an agency that was supposed to modernize the shops around Greece’s archaeological sites ahead of the Olympics and generate a profit.

By the time the crisis hit, the agency’s payroll was stuffed with 227 people, including several dozen whom Eftimiou regarded as political patrons earning above-average salaries. The monthly wage bill had doubled in a few years from 300,000 euros to 600,000 euros per month.

The agency was shuttered in 2010, saddling the government with a loss of roughly $12 million.

“If we hadn’t had the salary expense, it could have flourished,” said Eftimiou, who is now trying his hand at exporting olive oil to Germany. “The friends of politicians were being paid a lot.”

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.

To pause and restart automatic updates, click "Live" or "Paused". If paused, you'll be notified of the number of additional comments that have come in.

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.