President Trump on Wednesday morning signed legislation imposing sanctions on Russia, Iran, and North Korea, according to the White House.

His signature caps a months-long process of passing a sanctions bill that started in the Senate as an effort to rein in Iran, but quickly expanded to target Russia. Democrats in the Senate insisted on including Russia as a way to retaliate against Russia's meddling in the 2016 election, and its move into Ukraine in 2014.

The Trump administration, like other administrations, made it clear it wasn't happy with the increased pressure from Congress to sanction Russia. Both Trump and Secretary of State Rex Tillerson made it clear they weren't fans of the bill.

But it passed the Senate 98-2, and it passed 419-3 in the House, leaving Trump with little choice. A veto by Trump would have resulted in a quick vote in both chambers to override that veto.

The most novel piece of the bill is language that gives Congress a chance to reject a decision by Trump to waive sanctions against Russia. Congress has grown restless for the last two decades with bills that let presidents waive sanctions, and result in numerous waivers.

The bill codifies sanctions put in place under Executive Orders that relate to blocking property owned by people who contributed to Russia's move on Ukraine, and Russia's "malicious cyber-enabled activities."

It also requires the U.S. to impose new sanctions related to cyberactivities, human rights abuse and corruption in Russia.

The Iran language requires the government to create a strategy for countering Iranian threats in the region, and requires the government to impose sanctions on any entity that helps Iran develop its ballistic missile program.

That includes blocking access to property in the U.S. and excluding targeted people from entering the U.S.

And, it imposes sanctions on the Iranian Revolutionary Guard Corps' Quds Force, which is the arm of the IRGC that carries out efforts to support terrorist acts.

On North Korea, the bill expands existing U.S. sanctions, and imposes new sanctions that target entities that give that country access to key military materials, including certain metals, rocket fuel, and jet fuel.