U.S. President Donald Trump | Alex Wong/Getty Images Trump signs Russia sanctions bill he opposed Confronted by almost-unanimous congressional support for the package, US president had little choice but to sign a bill that officials complain will tie his hands in dealings with Putin.

U.S. President Donald Trump plans to sign a Congressional law restricting his ability to lift sanctions on Russia, the White House said Friday night, in a severe blow to his budding relationship with Russian President Vladimir Putin.

Confronted by a united Congress and suspicions about his intentions towards the Russian leader, Trump had little choice but to sign the measure, whose passage the White House had opposed.

“It would have been foolhardy for the Trump administration to veto this bill,” said Edward Fishman, a former Obama State Department official who worked on Russia sanctions policy. “Congress would have overriden the veto, and all it will do is fuel the fire of the Russia scandal in Washington.”

The White House statement sought to save face from a resounding political setback, arguing that Trump had negotiated changes to early drafts of the bill and, "based on its responsiveness to his negotiations, approves the bill and intends to sign it."

The timing of the announcement — late on a summer Friday, amid headlines about White House staff turmoil — ensured relatively little coverage for what analysts called a major development in U.S.-Russia relations.

The legislation, which also imposes new penalties on North Korea and Iran, passed the House and Senate with just a handful of dissenting votes. It requires Trump to justify in writing any effort to ease sanctions on Russia and mandates an automatic Congressional review of any such move.

That severely limits Trump’s ability to cut a deal with Putin, whose top priority is the rollback of U.S. and European sanctions against his economy and associates.

Members of both parties have grown concerned about Trump's eagerness to befriend Putin despite strong evidence of Russian interference in the 2016 election and multiple investigations into alleged links between Trump associates and the Kremlin. Trump and Putin developed a friendly rapport in multiple conversations at the G20 summit in Hamburg earlier this month, one of them an after-dinner chat attended by no other U.S. officials.

But even before Trump agreed to sign the new sanctions measure, Putin angrily ordered a staff cut at the U.S. embassy in Moscow and the seizure of properties used by American diplomats in Russia.

That move returned a favor from December, when President Barack Obama shut down two Russian diplomatic compounds — one in Maryland and one in New York — as punishment for Russian meddling in the November election. U.S. officials said the rural compounds were used for espionage. The Kremlin says they were recreation spots and whose closure, Russian Foreign Minister Sergei Lavrov said earlier this month, was “robbery in broad daylight."

Russia did not initially retaliate for Obama’s December closure of the compounds — reportedly after Trump’s now-resigned national security adviser, Michael Flynn, told Russia’s ambassador in Washington that Trump would reverse the action after taking office. But Trump has not done so, and the sanctions he now plans to sign into law will now make that nearly impossible given sharp anti-Kremlin sentiments in Congress.

On Friday, Russian officials suggested that relations with the U.S. could be on a downward slope.

“We are not ruling out any steps, so to say, to bring to their senses those presumptuous Russophobes who are setting the tone on Capitol Hill today,” Russian Deputy Foreign Minister Sergey Ryabkov told reporters, according to the Kremlin-funded Russian outlet RT.

Ryabkov also warned of “potentially destructive consequences” from the legislation.

Analysts say Moscow still hopes to do business with Trump, who has largely shrugged off warnings about Putin’s intentions and said Washington and Moscow should cooperate in the Middle East and on issues like terrorism and cyber security.

The new sanctions bill will make that exceedingly difficult, however.

The measure enshrines into law sanctions imposed by Obama through executive orders and gives Congress 30 days to review any effort by Trump to weaken sanctions.

Earlier this month, the White House’s top legislative liaison, Marc Short, said the law amounted to an “unusual precedent of delegating foreign policy to 535 members of Congress.” Secretary of State Rex Tillerson has also urged Congress not to impede his “flexibility” to bargain with Moscow.

That echoes arguments from Obama, who resisted Congressional intrusions into his nuclear diplomacy with Iran. Obama unsuccessfully battled tougher sanctions on Tehran than he had wanted and was forced to submit his final deal for Congressional review.

But Obama officials who worked on the Iran deal call Russia a different case.

“I generally think Congress should be wary of impinging too far on executive branch prerogatives in foreign policy,” said Jon Finer, who served as chief of staff to Secretary of State John Kerry during the nuclear negotiations.

“But two key differences here make the Russia case exceptional: the unprecedented interference (which Trump is the only person in Washington incapable of acknowledging) in our election, and the Administration's constant stream of lies about its ties to Russia, which raise legitimate questions about why they want a deal,” Finer added.

The White House did win some changes to the legislation since its first passage by the House and Senate, including ones sought by energy companies that could be penalized, it was clear that Trump plans to sign the final product only grudgingly.

After Congress struck a deal to advance the measure last week, Trump angrily tweeted that “the phony Russian With Hunt continues,” calling it “very sad that Republicans, even some that were carried over the line on my back, do very little to protect their president.”

Trump isn’t the only critic of the legislation outside of Moscow. European officials have expressed alarm that the measure would grant Trump the power to ban investments in energy projects on the continent tied to Russia — a point of friction happily amplified by Russian media outlets.