The Senate voted Wednesday, 97-2, to pass a measure that would toughen sanctions on Russia and, in Republicans' first significant blow to President Donald Trump's agenda, prevent the White House from unilaterally easing or removing the sanctions imposed by President Barack Obama in 2014 and 2016.

The bipartisan measure would require the president to inform Congress before taking any action that could alter US foreign policy "with regard to the Russian federation," including changes to the sanctions regime imposed by Obama in response to Russia's annexation of Crimea in 2014 and meddling in the 2016 presidential election.

Republican Sens. Mike Lee and Rand Paul were the only GOP members to oppose the bill, which was cosponsored by Republicans Bob Corker, Lindsey Graham, John McCain, and Senate Majority Leader Mitch McConnell.

The bill still needs to pass the House and be signed by Trump to become law. But it seems likely to annoy the White House, which began looking into easing or lifting sanctions on Russia just days after Trump was inaugurated. The inquiries raised red flags among Obama-administration holdovers at the State Department, who asked Congress to preempt any attempts by Trump to alter the sanctions regime.

A senior White House official inquired again in March, however, asking the State Department to assess whether sanctions on Russia were harming US interests and whether lifting them would increase Russia's oil production and therefore help the American economy, according to The Daily Beast.

Secretary of State Rex Tillerson declined to support the measure when he appeared before the House Foreign Affairs and Appropriations committees on Wednesday.

"I would urge Congress to ensure any legislation allows the president to have the flexibility to adjust sanctions to meet the needs of what is always an evolving diplomatic situation," Tillerson told lawmakers. "Essentially, 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."

In addition to curbing the White House's power to act unilaterally with regard to Russia, the bill calls for imposing new sanctions on the Kremlin's military-intelligence and energy sectors and "prohibiting access to the properties of the Government of the Russian Federation" that Obama ordered vacated last December.

If passed, the measure could hamper ongoing talks between Trump administration officials and their Kremlin counterparts to remove the "irritants" in their relationship, beginning with the return of Russian diplomatic compounds in the US that were seized by Obama last year.

Democratic Sen. Sherrod Brown, another of the bill's cosponsors, told reporters on Wednesday that the White House was already beginning to lobby against the measure.

"I know that some people in the White House are pushing back," Brown said. "People in the White House, we hear, are making calls in the House to try to stop it, slow it, weaken it, dilute it."

A White House official told Business Insider on Wednesday that the administration thought the bill, in its current form, "poses a number of risks to the administration’s ability to conduct foreign policy." The official noted, however, that the White House was "still reviewing" the legislation and would not put out a position until it is amended in the House and lands on Trump's desk.

"Generally speaking, sanctions policies should be carefully calibrated by the foreign policy experts in the executive branch," the official added, noting that the administration "remains committed" to the existing sanctions.