The U.S. Senate gave final approval to legislation strengthening sanctions on Russia and giving Congress the power to block President Donald Trump from lifting them, setting up a possible clash with the White House. The measure, passed 98-2 Thursday by the Senate, has already cleared the House and now goes to the president. The White House has given mixed messages about whether Trump will sign the legislation at a time when Trump’s presidential campaign is under investigation over possible collusion with Moscow. The bill, which also imposes new sanctions on Iran and North Korea, had been delayed while lawmakers resolved procedural issues and revised language that energy companies said would prevent many overseas deals. The Russia sanctions in H.R. 3364 are an unusual signal of disapproval of Trump from congressional Republicans. Lawmakers say they want to prevent the president from acting on his own to lift penalties imposed by the previous administration for meddling in last year’s U.S. election and for aggression in Ukraine. House and Senate committees and the Federal Bureau of Investigation are examining possible ties between the Trump campaign and Russia. The legislation puts Trump in a difficult position. Signing the measure would dilute his power. But rejecting it could lead to an embarrassing veto override, as the bill cleared both chambers by wide margins, and lead to criticism that he’s seeking to protect Russia. An official in the White House wouldn’t say whether Trump would sign it, saying only that they are reviewing the bill and that the administration supports sanctions against the three countries. How Russia responds will depend on the final form of the legislation, Russian President Vladimir Putin told reporters at a news conference Thursday while visiting Finland. U.S. sanctions against Russia are “absolutely illegal from the point of view of international law,” Putin said. “At some point we will have to respond. It’s impossible to tolerate boorishness toward our country forever.” White House Communications director Anthony Scaramucci told CNN on Thursday that Trump may “sign the sanctions exactly the way they are or he may veto the sanctions and negotiate an even tougher deal against the Russians.” The sanctions against Iran, modeled on previous executive orders, were designed to punish entities that support terrorism, sell weapons to the country, or help its ballistic missile program. The bill also authorizes, but doesn’t require, sanctions on human-rights abusers. The North Korea sanctions are designed to punish the country for its nuclear and ballistic-missile programs. The bill contains additional economic sanctions and requires banks to ensure their accounts aren’t being used in transactions involving sanctioned entities. Lawmakers from both parties said it would be a mistake for Trump to veto the legislation. “It’s typically not good for presidents to veto something that can be overwhelmingly overridden,” said Senator Bob Corker, a Tennessee Republican and chairman of the Foreign Relations Committee. Senate Minority Leader Chuck Schumer of New York rejected the idea that Trump would veto the legislation to make sanctions even tougher. “If the president vetoes this bill, the American people will know that he is being soft on Putin, that he’s giving a free pass to a foreign adversary who violated the sanctity of our democracy,” Schumer said. The president’s authority to waive or lift sanctions related to Russia would be limited by the measure, including sanctions imposed under several laws and executive actions, such as the prohibition on Russian access to diplomatic properties in Maryland and New York. Before granting a waiver, ending sanctions on a person or entity, or granting a license “that significantly alters United States foreign policy” on Russia, the White House would have to submit a report to Congress describing the proposed action and the reasons for it. Each report would have to highlight whether the action is intended to change the direction of U.S. policy toward Russia, as well as the anticipated effects on diplomacy and national security. Lawmakers could then block any attempt to ease Russian sanctions.