The Senate voted Wednesday to impose sanctions against Russia, in response to that country's attempts to interfere with and influence the 2016 election.

Lawmakers voted 97-2 to attach the sanctions language to a bill sanctioning Iran over its ballistic missile program and sponsorship of terrorism. The measure includes language that would prevent the president from lifting the sanctions without congressional approval.

Sens. Mike Lee, R-Utah, and Rand Paul, R-Ky., were the only senators to vote against the amendment.

The vote on the Russia measure came after days of bipartisan negotiations. Democrats insisted the provision include language saying only Congress can lift the sanctions, even though Trump administration officials have said they do not intend to lift them.

"Democrats and Republicans are joining together to warn the president he cannot lift sanctions without our approval," said Senate Minority Leader Chuck Schumer, D-N.Y.

The amendment would sanction Russia for a variety of misdeeds, including the nation's encroachment into Ukraine and aggressive actions in Syria, by codifying punishment put in place under the Obama administration. But the recent Russian cyberhacking into the Democratic National Committee is what primarily pushed Democrats and Republicans seek additional sanctions.

The hacking exposed politically damaging information about the Democrats and presidential nominee Hillary Clinton, who continues to blame Russia's actions for her loss.

"It is time to respond to Russia's attack on American Democracy with strength, with resolve, with common purpose and with action," said Senate Armed Services Committee Chairman John McCain, R-Ariz.

Democrats had threatened to block the Iran sanctions bill unless lawmakers included an amendment to punish Russia.

The amendment includes new sanctions on "key sectors of Russia's economy," according to the Senate Foreign Affairs Committee, including mining, metals, shipping and railways.

The sanctions would also target "corrupt" Russian individuals, such as those perpetuating human rights abuses or supplying weapons to Syrian President Bashar Assad.

The overall sanctions legislation could pass as early as Thursday. The House has not indicated when, or if, it will consider the bill.