White House Press Secretary Sarah Huckabee Sanders said President Trump was joking when he thanked Russian President Vladimir Putin Thursday for ordering a reduction to the number of U.S. diplomatic staff in the country.

“He was being sarcastic,” Sanders explained in an email to The New York Times.

Trump said Putin was doing him a favor by reducing the staff because the move "cut down our payroll."

“I want to thank him because we’re trying to cut down our payroll and as far as I’m concerned I’m very thankful that he let go of a large number of people because now we have a smaller payroll," Trump told reporters at his Bedminster, N.J., golf club this week.

Putin seized two American diplomatic properties and ordered a reduction of 755 diplomatic staff in response to U.S. sanctions last month.

The sanctions were overwhelmingly supported in Congress, passing 419-3 in the House and 98-2 in the Senate. The White House opposed them, however.

“While I favor tough measures to punish and deter aggressive and destabilizing behavior by Iran, North Korea, and Russia, this legislation is significantly flawed," the president said in a statement. ""In its haste to pass this legislation, the Congress included a number of clearly unconstitutional provisions."

He continued: "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. The Framers of our Constitution put foreign affairs in the hands of the President. This bill will prove the wisdom of that choice."