Rep. Adam Schiff, the head of the House Intelligence Committee, got a heads-up on a whistleblower’s allegations about President Trump’s phone call with his Ukrainian counterpart days before a complaint was filed, according to a report Wednesday.

Trump, asked about the development from the New York Times during a White House press conference, said it was a “scandal” and suggested that Schiff wrote the complaint himself.

“I think this is a scandal, and I think he wrote it,” Trump told reporters.

The whistleblower, identified as a CIA officer, first had a colleague contact the agency’s top lawyer with his worries about the July 25 phone call, the Times reported.

In the call, Trump asked Ukrainian President Volodymyr Zelensky to probe the son of political rival Joe Biden — a move that has been alleged to be a quid pro quo to keep hundreds of millions of dollars in US military aid flowing to Ukraine.

Concerned with how his claims were being handled in the CIA, the whistleblower — who did not personally witness or hear the phone call, but learned of it secondhand — approached an aide to Schiff.

In both cases, the initial accusations were vague, the newspaper said.

The House aide, following the panel’s procedures, then suggested the whistleblower find a lawyer to advise him on how to file a complaint.

The aide shared some of what the whistleblower knew with Schiff but did not identify him.

“Like other whistleblowers have done before and since under Republican- and Democratic-controlled committees, the whistleblower contacted the committee for guidance on how to report possible wrongdoing within the jurisdiction of the intelligence community,” said Patrick Boland, a spokesman for Schiff.

In his comments, Trump gave the Times — a frequent target of his “fake news” barbs — credit for publishing the story.

“Walking up here, it was handed to me, and I said … that is a big thing. And he helped to write it, too. It is a scam.”