U.S. President Donald Trump signed sanctions against Russia into law on Wednesday, in reaction to its alleged hacking of institutions related to the U.S. presidential election, according to two White House officials cited by the Associated Press.

The White House announced last Friday that Trump would sign the legislation, which passed through the U.S. Congress with near-unanimous support. In a signing statement widely circulated on social media, Trump distanced himself from the legislation.

“While I favor tough measures to punish and deter aggressive and destabilizing behavior by Iran, North Korea, and Russia, this legislation is significantly flawed,” he wrote.

Tensions between the U.S. and Russia have escalated since the U.S. Congress passed the sanctions last Friday.

Moscow ordered the U.S. Embassy to slash its diplomatic staff by hundreds of people in response. And reports have since circulated through the Russian media that the U.S. Embassy has responded in turn by rejecting travel visas for Russian applicants, a claim the U.S. Embassy denies.