In the great debate over the economy we sometimes forget the simple arithmetic of economic rebalancing. This arithmetic, like it or not, severely limits the options open to Spain.

For many years, thanks partly to bad policies in Spain but mainly to aggressive attempts by Germany to achieve growth by forcing a trade surplus onto its European neighbors, Spain, and many other countries in Europe, ran enormous trade deficits. It is easy and popular to blame the greed of the Spanish and the stupidity of the government for the mess in which Spain has found itself, but the policies Germany put into place in the late 1990s guaranteed that Germany, a country that had run massive trade deficits in the 1990s, would run equally massive trade surpluses in the subsequent decade.

Because once they joined the euro the rest of Europe had no control over the value of their currencies and the level of their interest rates. It was inevitable that European countries that had joined the euro with a higher-than-average level of inflation would be forced to respond to German trade surpluses either by forcing up unemployment or by running the large trade deficits that corresponded to Germany’s trade surplus. No other choice was possible.

These deficits, as a matter of economic necessity, had to be financed with loans from Germany, leaving Spain with an enormous debt burden. Just as Spain could not run a trade deficit without borrowing from abroad, Spain can only repay its debt if it runs a trade surplus. What is more, since rich Spaniards are taking enormous amounts of money out of the country in order to protect themselves from the debt crisis they know is coming, the Spanish trade surplus must be large enough to accommodate both flight capital and debt repayments.

In practice there are only three ways Spain can achieve a sufficiently large trade surplus. The first way requires that Berlin reverse those policies that forced a German trade surplus at the expense of its European neighbors. Berlin must cut taxes and increase spending so much that Germany runs a trade deficit large enough to allow Spain to run the opposite surplus, which it must do if it hopes to repay the debt.

This, by the way, is exactly what John Maynard Keynes demanded that the United States do in the late 1920s if it wanted to avoid a global crisis. The United States ignored Keynes, and the crisis occurred just as he predicted. Germany, with the same uncomprehending stubbornness today that the United States displayed in the 1920s, refuses to do what is necessary to prevent a crisis.

But, and this is the key point, if Germany does not move quickly to reverse its trade surplus, Spain only has two other ways of creating a trade surplus in spite of German recalcitrance. One way requires that Spanish wages are forced down by many years of high unemployment. This will allow Spain to run a sufficiently large trade surplus. Part of the reason Spain can then run a trade surplus is that as wages drop relative to those of Germany, Spanish goods will become more competitive in the international markets. But the real reason why Spain will run a trade surplus after many years of unemployment is that Spanish workers will simply be unable to afford to buy much.

Spain’s second option is to leave the euro and devalue. This will immediately force down prices and wages relative to Germany.

Neither option will be easy, but it is important that we realize that if Germany doesn’t adjust, Madrid has no choice but to pick one or the other. Both options will cause debt to soar in real terms, and will probably force Spanish businesses, and even the government into default. But in both cases Spain will begin running large trade surpluses.

As much as leaders in Madrid, Brussels, and Berlin hate to admit it, these are the only three options open to Spain. Any policy proposed by policymakers that is not consistent with one of these three ways will be impossible to achieve.

For now, Spain has chosen the option of unemployment, in the hopes that it will be able to adjust and eventually resume to normalcy. No country, after all, can bear the pain that Spain is bearing today without a serious deterioration in the social and political fabric.

But both history and common sense teach us that the idea that after one or two more years of adjustment Spain will have resolved its debt problems and can bring unemployment down is nonsense. If Spain wants to continue along its current path, it must be prepared to suffer another five to ten years of extraordinarily high unemployment, an erosion of the productive capabilities of its economy, and rising political chaos.

Or it can leave the euro.