President Trump appeared to confirm the authenticity of a trove of CIA documents recently published by WikiLeaks — breaking from US government policy never to confirm the docs were legitimate.

“By the way, with the CIA, I just want people to know, the CIA was hacked, and a lot of things taken,” Trump said in an interview that aired Wednesday night on Fox News’ “Tucker Carlson Tonight.”

“That was during the Obama years,” Trump said, alluding to the timing of when the documents were stolen, not when they were published.

“That was not during us. That was during the Obama situation. [CIA Director] Mike Pompeo is there now doing a fantastic job,” the president added.

Just last week, White House press secretary Sean Spicer was careful to say he wouldn’t confirm the documents’ authenticity.

“[F]or obvious reasons it is our policy as a government not to confirm the authenticity of any kind of disclosure or hack. That would be highly inappropriate for us,” Spicer said at a March 8 press briefing at the White House.

Spicer, like his boss, blamed Obama for the leaks.

“But all of these occurred under the last administration – that is important. All of these alleged issues,” he said at the same briefing.

Trump’s apparent confirmation that the documents did come from the CIA would mean that in fact the CIA can use everyday electronics – from smartphones to high-tech TVs – as eavesdropping devices.