In his confirmation hearing for the position of secretary of defense last week, General James Mattis staked out a position on NATO that appeared strikingly at odds with that of his prospective boss, President-elect Donald Trump. While Trump has called NATO "obsolete" and said he seeks "good deals" with Russia, Mattis called for inserting American troops into the Baltic states as a "tripwire" to deter Russian aggression.

Who is right? To answer requires asking a different question: What is NATO for, anyway?

Probably the most famous answer was given by Lord Ismay, the first secretary general of NATO. He quipped that the purpose of the alliance was "to keep the Russians out, the Americans in, and the Germans down."

If that's what NATO is for, then much of what the alliance has been doing for the past 20 years would have to be described as "off-mission." So would Trump's call for NATO to "focus on terrorism," for that matter. But if the original mission no longer makes sense, perhaps the organization needs a new mission — or it needs to be scrapped. So: Is the original mission obsolete?

The Baltic states don't think so. The citizens of Estonia, Latvia, and Lithuania are acutely aware of Russia's involvement in fomenting secession in the Trans-Dniestria region of Moldova, in the Crimean peninsula of Ukraine, and in the Abkhazia and South Ossetia regions of Georgia, as well as the ways in which Russia has drawn former Soviet states like Belarus, Armenia, and Kazakhstan back into close embrace by their old metropole. They have every reason to fear similar moves to undermine their own prized independence.

Behind them, states like Sweden and Finland that have long prized their neutrality are increasingly concerned about Russia's intentions in the Baltic sea. While they are still unlikely to try to join NATO (in part out of fear that a formal affiliation of that kind might provoke rather than deter Russia), they have stepped up their cooperation with NATO to prepare to counter Russian moves.

Keeping the Russians "out," then, is still an entirely valid mission — and a good reason for a defensive alliance aimed at achieving collective security.

But what about keeping the Americans "in" and the Germans "down?"

Concerns that NATO allows Europeans to "free ride" on Americans are not new. Neither are concerns that America's security guarantees are not actually credible. Indeed, Irving Kristol of all people, the very godfather of neoconservatism, mused as long ago as 1983 whether America shouldn't withdraw its security guarantees precisely so as to prod Europe to build up its own defensive capacity, which (in his view) was the only credible way to deter Soviet aggression.

Such a conclusion applies in spades today. Estonia has no way of defending itself from Russian aggression. But Sweden and Finland would have genuine reasons to be concerned if Russia were to make a move against Estonia. That's an argument for a collective security arrangement in the Baltics. And since the United States shares an interest in a peaceful Baltic, we would have a strong interest in bolstering such an arrangement.

But our interest, being more attenuated, should not rationally be expressed by seizing the front-line position. While conflict in the Baltic would be a bad thing, it would be madness for America to go to war with Russia over Estonian independence. For that very reason, if the only deterrent to Russian revanchism is an American tripwire, then there's no credible deterrent at all. Collective security must be dominated by local forces that have the most to lose. Even in South Korea, where American troops act as just the kind of tripwire General Mattis suggests for the Baltics, they modestly bolster the Republic of Korea Armed Forces, one of the largest and most capable standing armies in the world.

Sweden and Finland undoubtedly cannot deter Russia alone, even if they make a robust commitment to doing so. But if they need support, they should first be getting it from their European neighbors — preeminently Germany. As the largest European economy, and with a Baltic coastline of their own, the Germans have the most to lose from conflict with Russia. That means they should be concerned about Russia's ambitions to undermine European collective security — as they are. But it also means they should want to avoid provoking Russia unnecessarily. So it is no accident that Germany has been far less-enthusiastic about NATO expansion, or about demonstrative military deployments in the Baltics, than have many newer and more-vulnerable European states.

Inasmuch as NATO keeps Germany "down" (while the EU helps raise Germany "up" in the economic sphere), this allows the Germans to have their cake and eat it too, counting on Americans to shoulder the burden of collective security and leaving them free to posture as a more reasonable interlocutor with the Russians. It is difficult to see how this is in America's interest — unless NATO's primary purpose is not in deterring Russia through collective security, but preventing the rise of a European rival to American power, and providing America with a force-multiplier for its own adventures.

Perhaps that was NATO's real purpose all along. As it happens, Lord Ismay had another line about what the alliance was for: NATO "must grow until the whole free world gets under one umbrella." Shorn of idealistic trappings, what this means is that NATO is an ideological project as well as a structure for collective security. Getting in means a country is part of the "free world," and deserving of protection. And there is only one country holding the protective umbrella.

It is under this banner that NATO has been extended to cover not only the Baltic states but to countries like Albania and Montenegro, not to mention providing cover for its more flagrantly activist adventures in Kosovo and Libya. And it is the idealism of that self-conception that has blinded us to the problem: A defensive alliance that continually expands is no longer defensive. Good fences may well make good neighbors, but only if you build the fence on a stable property line. Keep moving it, as NATO has done, and neighborliness will evaporate rather quickly.

If we still care about NATO's mission, then, we need to focus on properly defining it and then how best to achieve it. If NATO's mission remains collective security in Europe against the threat of a revanchist Russia, then that mission needs to be defined clearly, and undertaken primarily by Europeans themselves. America should remain "in," but Germany, far from remaining "down," should be expected to play a leading role. And the contours of the alliance should be fixed rather than subject to continuous expansion. Mattis' own stated objective of deterrence would be better served by a policy of firmness and restraint than one of wild swings between overtures to cooperation and reckless provocation.

Meanwhile, it's unclear what refocusing NATO to combat terrorism would really mean. An expansive military alliance with America is hardly necessary for cooperation on intelligence or even effectively patrolling the Mediterranean. And defeating ISIS requires brokering cooperation between Turkey, Iran, and the Gulf states more than it does any action by countries bordering the north Atlantic. Chasing shiny objects hasn't served NATO well in the past few decades. There's no reason to think Trump's preferred shiny objects would be any different.