US President Donald Trump has signed what he called a “seriously flawed” bill imposing new sanctions on Russia, pressured by his Republican Party not to move on his own towards a warmer relationship with Moscow in light of Russian actions.

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

The law also imposes financial sanctions against Iran and North Korea.

Mr Trump said the law will “punish and deter bad behaviour by the rogue regimes in Tehran and Pyongyang” and enhance existing sanctions on Moscow.

The president had been reluctant to proceed with the bill, even after it was revised to include some changes that American and European companies sought to ensure that business deals were not stifled by new sanctions.

Mr Trump has expressed frustration over Congress’s ability to limit or override the power of the White House on national security matters, saying that it is complicating efforts to co-ordinate with allies – a sentiment he expressed in Wednesday’s statement.

Vladimir Putin and Donald Trump
US President Donald Trump (right) met with Vladimir Putin at the G20 summit in Hamburg, but he has now signed a bill imposing sanctions on Russia (Evan Vucci/AP)

Last week, the House overwhelmingly backed the bill, 419-3, and the Senate rapidly followed its lead with a 98-2 vote.

Those margins guaranteed that Congress would be able to beat back any attempt by Mr Trump to veto the measure.

The president said that he signed the bill “for the sake of national unity”.

Donald Trump
Donald Trump was unable to prevent the sanctions bill from going through (Pablo Martinez Monsivais/AP)

“The bill remains seriously flawed – particularly because it encroaches on the executive branch’s authority to negotiate,” Mr Trump said.

“By limiting the executive’s flexibility, this bill makes it harder for the United States to strike good deals for the American people, and will drive China, Russia, and North Korea much closer together.”