Despite his calls for warmer relations with the Kremlin, President Trump on Wednesday signed a bill slapping new sanctions on Russia. It also puts new penalties on North Korea and Iran. (Wikimedia Commons)

President Donald Trump signed bipartisan legislation slapping new sanctions on Russia, Iran and North Korea — then harshly criticized the legislation and the 517 lawmakers who voted for it.

Trump’s words reveal anew his growing irritation at Republican lawmakers’ inability to pass legislation he prefers and Democrats’ unwillingness to help. A statement issued by the White House after he signed the sanctions bill includes this line: “Congress could not even negotiate a healthcare bill after seven years of talking.”

And in a sign of a growing rift between team the Republican president and Republican lawmakers, the president ended the statement with a jab: “I built a truly great company worth many billions of dollars. That is a big part of the reason I was elected. As president, I can make far better deals with foreign countries than Congress.”

The president announced he signed the measure into law “for the sake of national unity,” adding it “represents the will of the American people to see Russia take steps to improve relations with the United States.” It received 419 votes in the 435-seat House and 98 in the 100-seat Senate.

But Trump and many of his top lieutenants, including Secretary of State Rex Tillerson, loathe many of its provisions that he made law with his signature.

“The bill remains seriously flawed — particularly because it encroaches on the executive branch’s authority to negotiate,” Trump said, sounding a lot like previous presidents. “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.”

Trump also claimed absolute authority over foreign policy. While previous presidents have no doubt guarded the powers the founding document handed the Executive Branch and Office of the President to run America’s global affairs, almost all have acknowledged Congress also has a role.

“The framers of our Constitution put foreign affairs in the hands of the president,” Trump said. “This bill will prove the wisdom of that choice.”

Article II, Section 2 of the Constitution, for instance, says “He shall have Power, by and with the Advice and Consent of the Senate, to make Treaties, provided two thirds of the Senators present concur; and he shall nominate, and by and with the Advice and Consent of the Senate, shall appoint Ambassadors ...”

Two White House spokespersons did not respond to an email requesting clarification on whether the president is claiming Congress has no constitutional role in foreign policy.

Trump’s signing the measure ended several days of drama during which some of the president’s closest aides — one, Anthony Scaramucci, since fired — suggested he might veto the legislation.

The new law comes amid a scandal over whether the president’s 2016 campaign colluded with Vladimir Putin’s government. Trump has seemed reluctant to enact such sanctions, but bowed to domestic political pressures, mostly from his own party.

Senate Foreign Relations Chairman Bob Corker, R-Tenn., said multiple times last week that the Trump administration was “nonexistent” as lawmakers sought a final deal on the sanctions bill, even though the White House statement states “my Administration has attempted to work with Congress to make this bill better.”