At the end of World War I, Germans could hardly recognize their country. Up to 3 million Germans, including 15 percent of its men, had been killed. Germany had been forced to become a republic instead of a monarchy, and its citizens were humiliated by their nation’s bitter loss.

Even more humiliating were the terms of Germany’s surrender. World War I’s victors blamed Germany for beginning the war, committing horrific atrocities and upending European peace with secretive treaties. But most embarrassing of all was the punitive peace treaty Germany had been forced to sign.

The Treaty of Versailles didn’t just blame Germany for the war—it demanded financial restitution for the whole thing, to the tune of 132 billion gold marks, or more than $500 billion today.

How—and when—could Germany possibly pay its debt?

Nobody could have dreamed that it would take 92 years. That’s how long Germany took to repay World War I reparations, thanks to a financial collapse, another world war and an ongoing debate about how, and even whether, Germany should pay up on its debts.

Allied victors took a punitive approach to Germany at the end of World War I. Intense negotiation resulted in the Treaty of Versailles’ “war guilt clause,” which identified Germany as the sole responsible party for the war and forced it to pay reparations.

Germany had suspended the gold standard and financed the war by borrowing. Reparations further strained the economic system, and the Weimar Republic printed money as the mark’s value tumbled. Hyperinflation soon rocked Germany. By November 1923, 42 billion marks were worth the equivalent of one American cent.

Finally, the world mobilized in an attempt to ensure reparations would be paid. In 1924, the Dawes Plan reduced Germany’s war debt and forced it to adopt a new currency. Reparations continued to be paid through a strange round robin: The U.S. lent Germany money to pay reparations, and the countries that collected reparations payments used that money to pay off United States debts. The plan was heralded as a victory—Charles Dawes, a banker who later became vice president under Calvin Coolidge won a Nobel Prize for his role in the negotiations.

But the Weimar Republic still struggled to pay its debts, so another plan was hashed out in 1928.

The Young Plan involved a reduction of Germany’s war debt to just 121 billion gold marks. But the dawn of the Great Depression ensured its failure and Germany’s economy began disintegrating again.

HISTORY Vault: World War I Documentaries

Stream World War I videos commercial-free in HISTORY Vault.

In an attempt to thwart disaster, President Herbert Hoover put a year-long moratorium on reparation payments in 1931. The next year, Allied delegates attempted to write off all of Germany’s reparations debt at the Lausanne Conference, but the U.S. Congress refused to sign on to the resolution. Germany was still on the hook for its war debt.

Soon after, Adolf Hitler was elected. He canceled all payments in 1933. “Hitler was committed to not just not paying, but to overturning the whole treaty,” historian Felix Schulz told the BBC’s Olivia Lang. His refusal was seen as an act of patriotism and courage in a nation that saw the reparations as a form of humiliation. Germany made no payments during Hitler’s rule.

But Germany wasn’t destined to win the war, and the Third Reich ended with Hitler’s suicide in April 1945 and Germany’s official surrender a few days later. By then, the country was in chaos. Millions of people had been displaced. Over 5.5 million German combatants, and up to 8.8 million German civilians, were dead. Most of Germany’s institutions had crumbled, and its populace was on the brink of starvation.

The Allies exacted reparations for World War II, too. They weren’t paid in actual money, but through industrial dismantling, the removal of intellectual property and forced labor for millions of German POWs. After the surrender, Germany was divided into four occupation zones, and in 1949 the country was split in two. Economic recovery, much less reparations payments, seemed unlikely.

By then, West Germany owed 30 billion Deutschmarks to 70 different countries, according to Deutsche Welle’s Andreas Becker, and was in desperate need of cash. But an unexpected ray of hope broke through when West Germany’s president, Konrad Adenauer, struck a deal with a variety of western nations in 1953. The London Debt Conference canceled half of Germany’s debt and extended payment deadlines. And because West Germany was required to pay only when it had a trade surplus, the agreement gave breathing room for economic expansion.

Soon, West Germany, bolstered by Marshall Plan aid and relieved of most of its reparations burden, was Europe’s fastest-growing economy. This “economic miracle” helped stabilize the economy, and the new plan used the potential of reparations payments to encourage countries to trade with West Germany.

Still, it took decades for Germany to pay off the rest of its reparations debt. At the London Conference, West Germany argued it shouldn’t be responsible for all of the debt the old Germany had incurred during World War I, and the parties agreed that part of its back interest wouldn’t become due until Germany reunified. Once that happened, Germany slowly chipped away at the last bit of debt. It made its last debt payment on October 3, 2010—the 20th anniversary of German reunification.