"I want to thank him because we're trying to cut down our payroll … I'm very thankful that he let go of a large number of people because now we have a smaller payroll," Trump told reporters Thursday at his New Jersey golf club.
It is not clear how the Russian president kicking out U.S. diplomats would remove them from the U.S. payroll.
White House press secretary Sarah Huckabee Sanders on Friday said Trump "was being sarcastic" when he made the remark. When asked about it later Friday, Trump agreed with his spokeswoman's take.
After Congress passed a new Russia sanctions package, Putin said the U.S. would have to reduce its diplomatic mission there by 755 people. Trump later signed the bill, but said he had "problems" with it.
Members of Trump's administration, who had sought better relations with Russia, called the developments another setback. Secretary of State Rex Tillerson said relations with Moscow were under "considerable stress."
Those sanctions came partly in response to accusations of Russian attempts to influence the 2016 election.
Former FBI Director Robert Mueller is the special counsel overseeing the federal investigation into Russian meddling. Trump has fumed about that probe.
However, he said Thursday he has not thought about firing Mueller.
"I want them to get on with the task," Trump said.
But he contended that Mueller is investigating "something that never happened."
In free-flowing, disjointed comments, Trump also lashed out on Democrats and claimed they are the ones who should be investigated for collusion. He detailed reasons why he thinks Putin would have preferred Clinton in office, contrary to what the U.S. intelligence community concluded.
"There was no collusion between us and Russia. In fact, the opposite," Trump said. "Russia spent a lot of money on fighting me, and if you think about it, I want a strong military — you see our budget is up by — it will be hundreds of billions of dollars soon. Our military budget. Russia doesn't like that. Hillary was going to cut the budget substantially — the military budget. Russia — is very important for Russia — oil. Oil and gas. We are now an exporter because of an incredible six months that — an exporter of oil and gas. That's bad for Russia."
He added: "I don't think Russia wants me because I want a strong military and I want low energy prices. Energy is a disaster, low energy prices is a disaster for Russia."
The president also accused Russia and Democrats of funding "that false report" — the infamous anti-Trump dossier filled with unproven claims about ties to Russia. It is unclear from where he got the claims of Russian and Democratic funding.
"You can say that was collusion, plus, the Democrats colluded on the Ukraine, so they colluded," Trump said. "And then when you get down to it, why isn't the FBI looking at the DNC server? You have a server that they refused, the Democrats refused to give to the FBI. Now, I don't know how the FBI can investigate something if the DNC, the Democrats refused to give the server."
Trump was referencing a Politico report about Ukrainian efforts to help his 2016 opponent, Hillary Clinton. He also pointed to the hack of Democratic National Committee emails that the U.S. intelligence community has attributed to Russian-linked hackers.
The DNC has repeatedly said it has cooperated in providing information about the server to the FBI.