Montenegrin sailors stand at the light frigate “Kotor” in the harbor of Bar, Montenegro, on March 15, 2017. (AP Photo/Darko Vojinovic)

With the support of the Trump administration, the Senate took a swipe at Russia on Tuesday by voting to let one of Europe’s smallest countries into NATO.

The Senate approved Montenegro’s bid to become a full-fledged member of the security alliance by an overwhelming vote of 97 to 2.

Hawks and moderates of both parties were convinced that Russia’s influence should be checked wherever possible, and that adopting Montenegro — once part of the former Yugoslavia — was a way to do it.

“It is a nation in this contest that we are now engaged in with Vladimir Putin, who has committed to extending the reach and influence of the Russian government … to the point where he attempted a coup to overthrow the freely elected government of Montenegro,” Sen. John McCain (R-Ariz.) said on the Senate floor Monday. “If we turn down Montenegro, it will not remain the democracy that it is today.”

Authorities in Monte­negro claim that pro-Russian factions attempted to stage a coup last October during parliamentary elections. Russia has denied any involvement.

The Kremlin also is strongly opposed to any more expansion of NATO. Three Balkan countries that were once in Russia’s Cold War sphere of influence are in the process of joining. Georgia, a former Soviet republic, has also expressed interest in joining.

All current NATO member states must ratify Montenegro’s bid in order for it to accede to the treaty — or become a member.

The road to ratifying Montenegro’s bid in the U.S. Senate has not been entirely smooth. During the last Congress, the term clock ran out before the Senate got a chance to vote on Montenegro — leading many to wonder whether Republicans were dragging their feet because Trump had struck a conciliatory tone on Russia.

The president spoke highly of Putin on the campaign trail, and the intelligence community determined that Russia had attempted to interfere in the 2016 election with the intention of promoting Trump’s candidacy. Two congressional committees, as well as the FBI, are currently investigating possible ties or collusion between the Kremlin and members of Trump’s campaign and transition teams.

But the administration urged the Senate to approve Montenegro’s effort to join NATO. In a letter, first reported by Reuters, Secretary of State Rex Tillerson wrote to Senate leaders earlier this month that ratifying Montenegro’s membership is “strongly in the interests of the United States.”

In fact, the opposition to Montenegro’s bid came from just two senators — Kentucky Republican Rand Paul and Utah Republican Mike Lee. Paul argued that supporting it is a waste of U.S. taxpayer money.

Accusing his fellow senators of simply using the issue as an excuse for “a punching session about Russia,” Paul said Monday that “admitting Montenegro to NATO will do nothing to advance our national security and will do everything to simply add another small country to the welfare wagon of NATO.”

Paul’s tone was reminiscent of Trump’s disparagement of NATO during his presidential campaign, when he told the New York Times that member states “aren’t paying their bills” — suggesting that the U.S. commitment to fulfill its treaty obligations to other members of the alliance might be leveraged by whether those countries had settled their accounts.

As president, he appears to have altered his stance, pledging earlier this year that the United States will “strongly support NATO,” as reported by CNN — though he continued to stress that other NATO members have to contribute more toward collective defense.

NATO members agreed in 2014 to a 10-year timetable to spend 2 percent of their gross domestic product on defense. Most do not at the moment.

Montenegro’s contribution, as a country with a GDP of about $4 billion and a standing army of about 2,000 soldiers, would likely not contribute much, even if it meets the 2 percent target.

NATO members have been called upon only once to meet their collective security obligations under Article 5 of the North Atlantic Treaty — after the Sept. 11, 2001, terrorist attacks in the United States.