The White House said late Friday that President Trump will sign legislation that strengthens sanctions against Russia and will allow Congress to block him from easing the penalties.

In a statement, the White House said Mr. Trump had "read early drafts of the bill and negotiated regarding critical elements of it." Having read the latest version, the White House said Mr. Trump intends to sign it.

The bill also imposes sanctions against Iran and North Korea.

Get Breaking News Delivered to Your Inbox

The Senate passed the bill, 98-2, two days after the House pushed the measure through by an overwhelming margin, 419-3. Both were veto-proof numbers.But the White House had objected to a key section of the bill that would mandate a congressional review if Trump attempted to ease or end the sanctions against Moscow.

The bill had somewhat put Mr. Trump in a corner, since the congressional review had been put in the bill due to a weariness from both sides of the aisle about Mr. Trump and Russian President Vladimir Putin.

The legislation is aimed at punishing Moscow for interfering in the 2016 presidential election and for its military aggression in Ukraine and Syria, where the Kremlin has backed President Bashar Assad. It also imposes financial sanctions against Iran and North Korea.

Before Trump's decision to sign the bill into law, Sen. John McCain, (R-Ariz.), said the bill's passage was long overdue, a jab at Mr. Trump and the GOP-controlled Congress. McCain, chairman of the Armed Services Committee, has called Putin a murderer and a thug.

"Over the last eight months what price has Russia paid for attacking our elections?" McCain asked. "Very little."

Earlier Friday, Russia's foreign ministry said it would require the number of U.S. diplomats in Russia to be reduced by September 1. The statement also said that if the United States further reduced the number of Russian diplomatic staff currently allowed in the U.S., Russia would mirror that action.