President Trump has ratcheted up his claim that the Obama White House spied on his 2016 campaign, charging in a new book that it was a “treasonous” act by the former Democratic president.

“What they did was treasonous, OK? It was treasonous,” he told author Doug Wead for his upcoming book, "Inside Trump's White House: The Real Story of His Presidency."

“The interesting thing out of all of this is that we caught them spying on the election. They were spying on my campaign. So you know? What is that all about?” said Trump.

“I have never ever said this, but truth is, they got caught spying. They were spying,” said Trump who then added, “Obama.”

[Read more: Trump presidency disrupts family, for good and not]

President Trump (seated) meets with Doug Wead in the Oval Office of the White House. Wead provided the photo to Secrets. (Official White House Photo/Tia Dufour)

In 2017, Trump tweeted that he felt the Obama White House “had my wires tapped” in Trump Tower. He later said he didn’t mean it literally but that he felt his campaign was being spied on.

Attorney General William Barr earlier this year said he was looking into whether “improper surveillance” may have occurred in 2016. "I think spying did occur," he said.

He has tasked a prosecutor to look into Obama officials and other officials who sparked the Russia collusion investigation into Trump after a report showed no collusion. New reports on that investigation described it as “criminal” in nature.

“It turned out I was right. By the way,” Trump told Wead in excerpts provided to Secrets. “In fact, what I said was peanuts compared to what they did. They were spying on my campaign. They got caught and they said, ‘Oh we were not spying. It was actually an investigation.’ Can you imagine an administration investigating its political opponents?” said the president.

In the book, Trump said that the Russia investigation undercut his presidency.

“Anybody else would be unable to function under the kind of pressure and distraction I had. They couldn’t get anything done. No other president should ever have to go through this. But understand, there was no collusion. They would have had to make something up,” he said.