The U.S. Capitol in Washington. (Astrid Riecken/For The Washington Post)

The Senate voted overwhelmingly Wednesday to allow Congress to block any efforts by the president to scale back sanctions against Russia, and to strengthen those sanctions in retaliation for Moscow’s alleged interference in the 2016 election and its actions in Syria.

The vote of 97 to 2 is a sharp rebuke to President Trump’s posture on Russia and his resistance to the intelligence community’s assessment that the country was behind efforts to influence the election he won.

The two senators who voted against the measure were Republicans Rand Paul (Ky.) and Mike Lee (Utah).

Trump has repeatedly and openly doubted the intelligence community’s finding that Russia meddled in the presidential election. While his administration has not ordered a rollback of any existing sanctions, lawmakers have been concerned about his conciliatory, and at times even forgiving, rhetoric about Russia, as well as recent moves to give Moscow back control over two diplomatic compounds that the Obama administration reclaimed in late December.

The administration said Russia had been using the facilities for intelligence gathering; when they were shuttered, 35 Russian operatives were also expelled from the country.

“This administration has been too eager, far too eager in my mind, to put sanctions relief on the table,” Senate Minority Leader Charles E. Schumer (D-N.Y.) said Wednesday. “We cannot let Russia’s meddling in our elections go unpunished, lest they ever consider something similar again.”

Trump’s campaign is currently the focus of congressional and FBI scrutiny, as investigators try to determine if there was any collusion between his supporters and Russia. The president has accused Democrats of pursuing a witch hunt against him.

The president’s team pushed back Wednesday against the legislation, with Secretary of State Rex Tillerson warning lawmakers against passing anything that might tie the administration’s hands.

“We would ask for the flexibility to turn the heat up when we need to, but also to ensure that we have the ability to maintain a constructive dialogue,” Tillerson said in testimony before the House Foreign Affairs Committee.

“I certainly agree with the sentiment that has been conveyed by several members from both parties that Russia must be held accountable for its meddling in U.S. elections,” Tillerson said, adding that he agrees Russia did attempt to interfere.

But Tillerson also said his mandate is to try to improve U.S. relations with Russia in ways that would benefit the United States, and he suggested that the new penalties may get in the way.

Tillerson’s testimony is effectively a warning that the administration may oppose a package of new punishments that could be approved by the Senate this week.

But if the Senate’s vote is any guide, congressional support for the measure will probably be veto-proof. The House has yet to vote on the measure, which was added as an amendment to a popular bill stiffening sanctions against Iran for that country’s recent ballistic missile tests.

Even the president’s staunchest supporters voted in lockstep with his sharpest critics Wednesday to endorse the Russia sanctions measure. Senate Banking Committee Chairman Mike Crapo (R-Idaho) referred to it applying “a correct amount of pressure” on Russia that will “ensure Congress exerts proper oversight over the use of these powerful sanctions.”

The measure lawmakers voted on Wednesday would give Congress the chance to block any efforts by the Trump administration — or any other president, for that matter — to roll back sanctions without the consent of Congress.

It would also codify existing sanctions against Russia over its annexation of Crimea and involvement in the war in eastern Ukraine.

The measure would then apply new sanctions against Russia for its activities in Syria, where the Kremlin is supporting the regime of Syrian President Bashar al-Assad, and for its alleged meddling in last year’s U.S. presidential election.

The punitive measures in the legislation are focused on various areas, including the Russian intelligence and defense sectors, parts of its energy sector, and its metals, mining and railways economy. It also includes provisions to better track and combat corruption and illicit financing structures that lead back to Russia.

The measure came about after several rounds of negotiations between the heads of the Banking and Foreign Relations committees, as well as congressional leaders. Sens. John McCain (R-Ariz.), Lindsey O. Graham (R-S.C.), Jeanne Shaheen (D-N.H.), and Richard Blumenthal (D-Conn.) also played a role in the negotiations advocating that various legislative ventures be included in the final product.

Before this amendment emergence, there were three Senate bills attempting to either strengthen or reinforce existing sanctions against Russia. Foreign Relations Committee Chairman Bob Corker (R-Tenn.) — who initially resisted calls to move ahead on a measure to sanction Russia — said earlier this week that he had also written a fourth measure but never released it.