The German economy ground to a halt in the fourth quarter of last year.

For most economic observers, this was a startling development. Despite the never-ending economic crises wracking Europe, Germany seemed like a perpetual bright spot, steadily clocking in 2-to-2.5 percent real GDP growth since 2014. But in the last year, Germany's growth nosedived and officially hit zero in 2018's final months. If it falls any further, Europe's biggest economy will be in recession territory.

The story of how this happened begins with a straightforward fact: Exports are nearly half the German economy.

Between 1970 and 1995, exports slowly rose from 15 percent to a little over 20 percent of Germany's GDP. But from 1995 to today, its exports exploded by another 25 percentage points — and stood at more than 47 percent as of 2017.

An enormous portion of Germany's workers and businesses rely on foreign consumers to buy their goods and services. In slightly more technical terms, roughly half the German economy relies on demand created in other countries — rather than on demand it creates itself — to keep humming. If those other economies stop providing that demand — either because their own economy tanks, or because they make a policy choice not to — Germany's economy gets dragged down. And starting last year, that all happened on several fronts.

First there were President Trump's steel tariffs, which cut into American demand for German steel products. Then there was the slowdown in China's economy: The Asian behemoth only hit 6.6 percent GDP growth in 2018, its lowest level in roughly 30 years and one that's still falling. Partially, that's thanks to Trump once again and his ongoing trade war with the country. But the combination of China's state-run hybrid capitalism, Beijing's efforts to lift hundreds of millions of its citizens out of poverty, and the ongoing transition to a modern economy has left long-term structural challenges that are finally beginning to bite.

Germany had nowhere to turn. Outside of the U.S. and China, Europe was already a mess and most big developing economies were already struggling. Meanwhile, China is so big, and its domestic demand has such an outsized impact on the world, that when it slows down even a bit, everyone else tends to slow down too — including all the other countries that might buy German exports.

Thus, bad luck is the first part of Germany's story: A bunch of economic problems in other countries conspired to deprive Germany of demand for its exports. On top of that, America shocked the world by electing a pugnacious protectionist, who promptly started a bunch of trade fights, further exacerbating Germany's problem.

But that bad luck also shouldn't have been such big a deal.

An advanced economy like Germany's should have ways to create its own demand. It could deficit spend to stimulate its economy, or it could run looser monetary policy to encourage job and credit creation.

But this is Germany we're talking about. Its political culture is famously inflation-phobic, preferring both tight monetary policy and balanced budgets. Europe's rules limit deficit spending regardless. And as part of the euro currency zone, Germany couldn't loosen its monetary policy even if it wanted to — only the European Central Bank (ECB) can do that. But then, Germany is also the single biggest political force in Europe. The ECB's tight money policies and Europe's deficit rules are themselves largely manifestations of German preferences.

As a result, Berlin spent the last decade running very small fiscal deficits — or, more recently, surpluses. The smaller a government's deficit is, the less demand its fiscal policy is adding to the economy. If the government is running a surplus, it's taking demand out of its economy. If tight monetary policy is also keeping a lid on things, there's only one other place Germany can go to get more demand when it needs it: other countries.

Germany doesn't just export a ton. It has also run a trade surplus since the 1990s — lately reaching about 7.5 percent of GDP. It exports much more than it imports. Germany basically treats other countries' demand the same way oil companies treat the Permian Basin: one-way extraction. This certainly annoys those other nations. But it also leaves Germany without any options whenever those other economies tank, or if they cut Germany off.

It's also worth mentioning that this all came with costs for ordinary Germans even before last year. Running trade surpluses requires keeping your exports competitive. That means holding down costs, which quite often means labor costs — i.e. workers' incomes. For 40 percent of Germans, real wages actually fell over the last two decades. Germany's inequality has gotten considerably worse, and its poverty rates are rising. This, too, is a consequence of the squeeze the German policymaking elite deliberately put on their own economy.

Ironically, they did all this because it seemed "responsible." Tight money and low inflation, balanced budgets, trade surpluses — all those things are supposedly evidence of sober and mature leadership. But as Germany is now painfully learning, economies are not morality plays.