The Senate voted overwhelmingly Wednesday to allow Congress to block any efforts from the president to scale back sanctions against Russia, and to step up sanctions against Moscow for interfering in the 2016 elections.

The vote of 97 to 2 is a sharp rebuke to President Donald Trump's posture vis-à-vis 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 veracity of the assessment. And while his administration has not ordered a rollback of any existing sanction, 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 Schumer, D-N.Y., said. "We cannot let Russia's meddling in our elections go unpunished, lest they ever consider something similar again."

Trump's campaign has been the focus of congressional and FBI scrutiny in the past several months, as investigators dig into allegations his surrogates colluded with Russian officials to swing the election. He 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, applying what Senate Banking Committee Chairman Mike Crapo, R-Idaho, referred to as "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 Assad, and for its 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 measures 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 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.