President Donald Trump signed a bill imposing new sanctions on Russia Wednesday morning, putting to rest questions about whether he would support the legislation passed by Congress last week.

The bill sanctions Russia — citing its cyberhacking as well as aggression in Ukraine and Syria — while also slapping new sanctions on North Korea and Iran. But the legislation also makes it harder for the president to lift these sanctions unilaterally, requiring permission from Congress before waiving them.

Trump signed the bill behind closed doors, with no press coverage. Counselor to the President Kellyanne Conway confirmed Trump signed the legislation on Fox News.

Secretary of State Rex Tillerson told reporters Tuesday that neither he, nor President Trump, "were very happy" about the way Congress put these new sanctions in place, but anticipated the bill would be signed anyway.

"We were clear that we didn't think it was going to be helpful to our efforts, but that's the decision they made, they made it in a very overwhelming way. I think the president accepts that," he said.

The sanctions bill was passed in both chambers of Congress by veto-proof margins. It passed in the Senate on Thursday with a 98-2 vote and in the House last Tuesday, 419-3.

Lawmakers pushed the sanctions, particularly those against Russia, in spite of the president's conciliatory tone toward the country whose government U.S. intelligence agencies concluded meddled in the 2016 presidential election. Russian government officials, including President Vladimir Putin, have denied the allegations, both in the press and to President Trump directly.

Putin voiced his objection to the proposed sanctions last week, accusing the U.S. of attempting to use "geopolitical advantages in competition to pursue economic interests at the expense of [U.S.] allies."