Angela Merkel is, her supporters like to gloat, the leader of the free world.

Just don’t ask her to spend as if she is.

President Trump has made the German chancellor one of his favorite rhetorical targets, especially over Germany’s anemic defense expenditures. This has led to worries about the future of the trans-Atlantic alliance, and reflexive support for Merkel among the American political elite.

Trump shouldn’t openly mock Merkel, or suggest that there have been annual dues to NATO that Germany has failed to pay. Trump tends to view foreign countries like contractors trying to scam him in a development deal. This neglects history, geostrategy and the national pride of other countries — as usual, Trump would benefit from at least a gesture toward statesmanship.

Yet, Germany’s defense spending, or lack thereof, is a disgrace. One would think the country would have been embarrassed onto a different trajectory after German troops — Panzergrenadierbattalion 371, to be exact — had to use broomsticks instead of guns in a NATO exercise in 2014. But Germany evidently doesn’t embarrass easily.

NATO countries, after a long vacation from history after the end of the Cold War, agreed at a summit in Wales in 2014 to spend 2 percent of GDP on defense annually within 10 years.

The Baltic states, and anyone in the direct line of fire of Vladimir Putin’s Russia, are scared and spending like it — although no one will mistake these countries for behemoths. England is above 2 percent, at least in theory (one think tank says it’s actually 1.6 percent). France is steadily increasing toward the 2 percent target.

It is the biggest economy in Europe and fourth-largest in the world that is the serious laggard. Germany spends all of 1.2 percent of GDP on defense. As Elizabeth Braw points out at Foreign Policy, its military is short on tents and winter clothes. Its aircraft suffers from missing spare parts and most of its tanks aren’t battle-ready.

It has a shortfall of about 20,000 officers and noncommissioned officers. It is promising to get to 1.5 percent GDP . . . by 2025 (when a Trump second term would be ending).

Merkel is happy to browbeat other EU countries over their fiscal and migrant commitments, but please don’t bother her to spend on her own defense.

The old saw, courtesy of Lord Ismay, NATO’s first secretary general, is that NATO exists to “keep the Soviet Union out, the Americans in and the Germans down.” But the last item in his formulation, given the deep streak of pacifism in postwar German politics, is no longer apt.

It’s not as if the German tanks will inevitably rumble through the Ardennes if the country’s defense budget touches 2 percent (the EU, not military conquest, is now Germany’s tool for European influence).

The problem is that, for Germany, the end of history never quite ended. It still has a gauzy view of what matters. Its foreign minister has argued that its development aid should count against its goal for military spending, fundamentally confusing soft and hard power.

A member of Merkel’s party in parliament says that it’s “not acceptable to point the finger at Germany, which is bearing the main burden of the refugee reception in all of Europe.”

Needless to say, if Putin is tempted to challenge NATO somewhere on its periphery, he’s not going to be dissuaded by Germany’s foreign-aid budget or its openness to Middle Eastern migrants.

It’s not clear how seriously Germany takes the Russian threat (although it sent some troops to Lithuania last year). Germany has been supportive of the proposed Russian pipeline, Nord Stream 2, that would make Europe more dependent on Russian natural gas and bypass Ukraine. It’s been Trump, the alleged tool of Putin, who has been complaining bitterly about the project.

With Putin looming to the East, NATO remains a vital tool of Western power. It’s not an imposition to ask that Germany act like it.

Twitter: @RichLowry