Ukrainian marines practice urban warfare in NATO exercises under instructions from U.S. soldiers. (Sean Gallup/Getty Images)

Andrew Moravcsik is a professor of politics at Princeton University and a senior fellow at the Transatlantic Academy.

President Obama and Donald Trump rarely agree on foreign policy. Yet they share one core belief: Our closest allies in Europe are exploiting U.S. military might.

Trump says NATO should be renegotiated: It is “obsolete” and “unfair . . . to the United States . . . because we pay a disproportionate share.”

Obama has criticized Trump’s stance. Yet for years the president has been conducting his own NATO renegotiation — including demanding European leadership in the Libyan operation and telling Prime Minister David Cameron that if Britain wants to maintain the Anglo-American “special relationship,” it must increase defense spending to the recommended NATO minimum of 2 percent of gross domestic product. His explanation? “Free riders aggravate me.”

But Trump and Obama are both wrong. Although more foreign policy spending is always welcome, Europe already assumes more than its fair share of the regional security burden. It invests not only in its military but also in crucial geo-economic and institutional instruments that the United States does not possess — but needs. In this respect, the United States freerides on European power.

Consider the facts. The U.S. military commitment to European defense is surprisingly small. After the Cold War, almost 90 percent of American soldiers departed. Today only about 5 percent of total U.S. active-duty personnel and a few hundred among thousands of U.S. nuclear weapons are deployed there.

The primary purpose of this military presence is in any case not to defend Europe. It is to promote vital interests elsewhere. Without naval ports, air force bases, hospitals and command centers in Italy, Spain, Germany and Turkey, U.S. military operations in the Middle East, South Asia, the Mediterranean, Africa and the Arctic would be nearly impossible. In recent years, for example, 95 percent of people and materiel delivered to U.S. forces in Iraq and Afghanistan crossed through Europe.

Trump singles out resistance to Russia as a prime example of U.S. leadership. “Nobody else,” he said, “is fighting for the Ukraine.” Yet the slice of the United States’ $600 billion defense budget directed to supporting Ukraine or deterring Russia in Europe is tiny. One-time allocations of $800 million this year and $3.4 billion next year are earmarked for NATO “reassurance measures” in Eastern Europe. Less than a billion more goes for military aid to Ukraine, where key Western governments have ruled out a direct military response. By contrast, Poland alone spends nearly $10 billion annually on its military, and NATO Europe as a whole more than $250 billion.

Is $250 billion too little? Like Obama, the U.S. foreign policy establishment rejects Trump’s bluster yet almost unanimously embraces his underlying premise. A common complaint inside the Beltway is that European spending falls short (by roughly $75 billion) of the 2 percent of GDP that NATO leaders have pledged to spend.

Yet all such criticism of low European defense spending rests on a misleadingly narrow conception of national security. When Americans think about global influence, they tend to calculate only military power. Yet in world politics, nonmilitary instruments are often more effective. And Europe is the world’s preeminent civilian superpower.

Europe is the world’s largest trading bloc, provides two-thirds of the world’s economic aid and dominates most international organizations. It has invested heavily in the European Union, which spreads peace and market economics across the continent, and permits Europeans to negotiate as a bloc.

Europe’s resulting clout is most obvious in the very area in which Trump believes the United States is being exploited the most. The primary external force helping Ukraine resist Russia today is not the U.S. military but European geo-economic and diplomatic power.

No Western policy is more critical to keeping Russia at bay than Europe’s $9 billion in annual economic aid and debt relief to Ukraine, without which the country would long since have collapsed. This is about 10 times more than the United States provides. Europe has a similar though smaller assistance program for other countries in Russia’s neighborhood.

Brussels also recently signed a free-trade agreement with Ukraine, giving it an international lifeline in the face of Vladimir Putin’s tightening trade boycotts. Without this, the country would have no prospects to free itself from the Russian stranglehold and to achieve sustainable growth, since Europe is by far its largest trading partner.

Europe pays a high cost in lost trade to sustain Western sanctions against Russia: Some estimate the total loss at $50 billion annually. This is again more than 10 times more than the United States , because European trade and investment are that much higher.

Russia’s policy options are limited also by its dependence on European energy markets. Today E.U. authorities are further undermining the Kremlin’s leverage by clamping down on Russian energy monopolies and spending billions to diversify Europe’s energy imports. This includes rerouting the energy supply of Ukraine, which now imports more energy from Europe than from Russia.

Bolstered by Europe’s underlying strength, leaders such as German Chancellor Angela Merkel have taken the diplomatic lead in negotiations over eastern Ukraine. Within the Minsk Process, in which the United States is not formally involved, they have persuaded Putin to limit his territorial gains in eastern Ukraine, concede a cease-fire and withdraw heavy weapons under international oversight — with further plans for local elections and eventual removal of Russian forces still under discussion. Although Ukraine is far from secure, even such modest gains mark a remarkable diplomatic achievement, given the strategic edge that Russia enjoys when projecting power into its most culturally proximate and strategically vital Western neighbor.

The geo-economic and institutional instruments of power that permit Europe to flex its muscles with regard to Russia are simply unavailable to the United States, with its low levels of foreign aid, antipathy to international legal commitments and secondary economic status in the former Soviet zone, as well as its military dependence on forward bases. And resisting Russia is only one of many regional and global issues in which Europe has taken the lead.

Portraying Europe as a continent of slackers makes for rousing election-year rhetoric. But pulling back from a transatlantic partnership that benefits the United States at least as much as it does Europe would be self-defeating.