The Senate voted decisively on Thursday to approve a new package of stiff financial sanctions against Russia, Iran and North Korea, sending the popular bill to President Donald Trump for his signature after weeks of intense negotiations.

Never in doubt, however, was a cornerstone of the legislation that bars Trump from easing or waiving the additional penalties on Russia unless Congress agrees. The provisions were included to assuage concerns among lawmakers that the president's push for better relations with Russian President Vladimir Putin might lead him to relax the penalties without first securing concessions from the Kremlin.

The Senate passed the bill, 98-2, two days after the House pushed the measure through by an overwhelming margin, 419-3. Both are veto proof numbers as the White House has wavered on whether the president would sign the measure into law.

The legislation is aimed at punishing Moscow for meddling in the 2016 presidential election and its military aggression in Ukraine and Syria, where the Kremlin has backed President Bashar Assad.

Sen. John McCain, R-Ariz., said the bill's passage was long overdue, a jab at 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."

VIDEO: CAN SANCTIONS REIN IN ROGUE REGIMES?

Trump had privately expressed frustration over Congress' ability to limit or override the power of the president on national security matters, according to Trump administration officials and advisers. They spoke on the condition of anonymity to discuss internal White House deliberations.

But faced with heavy bipartisan support for the bill in the House and Senate, the president has little choice but to sign the bill into law. Trump's communications director, Anthony Scaramucci, suggested earlier Thursday on CNN's New Day that Trump might veto the bill and "negotiate an even tougher deal against the Russians."

Sen. Bob Corker, R-Tenn., said that would be a serious mistake and called Scaramucci's remark an "off-handed comment." If Trump rejected the bill, Corker said, Congress would overrule him.

"I cannot imagine anybody is seriously thinking about vetoing this bill," said Corker, chairman of the Senate Foreign Relations Committee. "It's not good for any president -- and most governors don't like to veto things that are going to be overridden. It shows a diminishment of their authority. I just don't think that's a good way to start off as president."

TRUMP ADMINISTRATION WANTS MORE IRAN INSPECTIONS, OFFICIALS SAY

Still, signing a bill that penalizes Russia's election interference would mark a significant shift for Trump. He's repeatedly cast doubt on the conclusion of U.S. intelligence agencies that Russia sought to tip the election in his favor. And he's blasted as a "witch hunt" investigations into the extent of Russia's interference and whether the Trump campaign colluded with Moscow.

The 184-page bill seeks to hit Putin and the oligarchs close to him by targeting Russian corruption, human rights abusers, and crucial sectors of the Russian economy, including weapons sales and energy exports.

The bill underwent revisions to address concerns voiced by American oil and natural gas companies that sanctions specific to Russia's energy sector could backfire on them to Moscow's benefit. The bill raised the threshold for when U.S. firms would be prohibited from being part of energy projects that also included Russian businesses.

Lawmakers said they also made adjustments so the sanctions on Russia's energy sector didn't undercut the ability of U.S. allies in Europe to get access to oil and gas resources outside of Russia.

The North Korea sanctions are intended to thwart Pyongyang's ambition for nuclear weapons by cutting off access to the cash the reclusive nation needs to follow through with its plans. The bill prohibits ships owned by North Korea or by countries that refuse to comply with U.N. resolutions against it from operating in American waters or docking at U.S. ports. Goods produced by North Korea's forced labor would be prohibited from entering the United States, according to the bill.

The sanctions package imposes mandatory penalties on people involved in Iran's ballistic missile program and anyone who does business with them. The measure would apply terrorism sanctions to the country's Revolutionary Guards and enforce an arms embargo.

Sens. Bernie Sanders, I-Vt., and Rand Paul, R-Ky., voted against the sanctions bill.