President Donald Trump has signed a new package of sanctions against Russia, Iran and North Korea, but issued a blistering statement insisting that the bill encroaches on the executive branch’s ability to conduct foreign policy.

“Since this bill was first introduced, I have expressed my concerns to Congress about the many ways it improperly encroaches on executive power, disadvantages American companies, and hurts the interests of our European allies,” Trump wrote in a statement as he signed the bill, which the Senate approved last week.

Russian Prime Minister Dmitry Medvedev called the sanctions tantamount to a “full-scale trade war,” adding in a Facebook post that they showed the Trump administration had demonstrated “utter powerlessness.”

“The hope that our relations with the new American administration would improve is finished,” he wrote.

While Trump said his administration worked with Congress to make the bill better, he notes the legislation “remains seriously flawed, particularly because it encroaches on the executive branch’s authority to negotiate.”

The legislation, which overwhelmingly passed both houses of Congress, bars Trump from easing or waiving the penalties on Russia unless Congress agrees.

Lawmakers have said Trump had little choice but to sign the bill, given the fact Trump and aides are under scrutiny over possible ties to Russia in the wake of its efforts last year to influence the presidential election. Congress could have easily overridden any possible Trump veto of this popular bill.

Trump had previously objected to the curbs on his ability to ease sanctions on Russia, a possibility he has raised in the past.

Taking a poke at lawmakers over their inability to repeal and replace Obamacare, Trump insisted that he can “make far better deals with foreign countries than Congress.”

“Congress could not even negotiate a health care bill after seven years of talking,” he 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.”

Still, Trump said, he would sign the bill “despite its problems.”

“I am signing this bill for the sake of national unity,” Trump said. “It represents the will of the American people to see Russia take steps to improve relations with the United States. We hope there will be cooperation between our two countries on major global issues so that these sanctions will no longer be necessary.”

Yet some Democrats saw Trump’s signing statement as an “apology” note to Putin.

Political analyst Jesse Ferguson, a former spokesman for Trump’s election opponent Hillary Clinton, said that “it’s far less significant that he signed a bill which would have become law anyway because of an override from Congress than it is that he attached a note apologising to Putin for doing it.”

In a statement last week that Trump intended to sign the bill, the White House said Trump “negotiated regarding critical elements” of early drafts of the bill and approved of the final draft “based on its responsiveness to his negotiations.”

Before the White House issued that statement Friday, Moscow retaliated against the possible sanctions by ordering the expulsion of American diplomatic personnel and seized recreational property used by embassy staff.

The Russian foreign ministry told Washington to cut its diplomatic staff by 755 by September 1, and said it would shutter a dacha, or country retreat, used by US diplomatic staff on the outskirts of Moscow, as well as some warehouse facilities.

Putin previously signalled that his country was prepared to hit back against Washington for what he called “anti-Russian hysteria.”

The sanctions from Washington relate to Russia’s 2014 annexation of Ukraine’s Crimea territory and support for a rebellion by separatists in east Ukraine, as well as alleged Russian meddling in the 2016 presidential election. The sanctions are meant to target Putin and his inner circle, a group that the US alleges includes corrupt officials and human rights abusers, and affect weapons sales and vital energy exports.

In late December, before President Obama left office, he sanctioned Russian intelligence officials, expelled 35 Russian diplomats suspected of being spies and shut down two Russian facilities in the United States. The moves were in response to Russia’s campaign of cyberattacks and fake news to influence the US election.

The US intelligence community has concluded that Moscow directed the election meddling to help Trump, claims Russia has denied. Trump has also equivocated on whether he agrees with the US intelligence assessment and even suggested at one point working with Russia on an “impenetrable” cybersecurity unit.

Putin did not retaliate against Obama’s sanctions in hopes that Trump would roll them back.

Vice President Pence said Tuesday at a news conference in Georgia that Trump would sign the latest sanctions bill as a message to Putin’s government about its “destabilising activities.”

“As always, our country prefers a constructive relationship with Russia based on cooperation and common interests,” Pence continued. “But the president and our Congress are unified in our message to Russia: A better relationship, the lifting of sanctions will require Russia to reverse the actions that caused sanctions to be imposed in the first place.”

Secretary of State Rex Tillerson said on Tuesday that he also was not thrilled about the new legislation.

“We were clear that we didn’t think it was going to be helpful to our efforts, but that’s the decision they made,” he said, referring to members of Congress. “They made it in a very overwhelming way. I think the president accepts that.”