Former FBI deputy director Andrew McCabe apologized for lying to agents who spent weeks investigating the source of a leak to the Wall Street Journal that actually came from him, new documents reveal.

Shortly before the 2016 election, The Journal reported that an FBI investigation was underway involving then-candidate Hillary Clinton and the Clinton Foundation.

McCabe in May 2017 denied that he was the source of the leak — but later fessed up, angering bureau investigators who had been spinning their wheels trying to identify the source of the leak.

The documents, which the FBI released in response to a Freedom of Information Act lawsuit by the government watchdog group Citizens for Responsibility and Ethics in Washington, include transcripts of McCabe’s conversations with investigators, who were frustrated after wasting their time on the probe.

On Aug. 18, 2017, FBI officials grilled McCabe again to try to unravel what they said was “conflicting information” they had gathered about the possible leak to the Journal, The Daily Beast reported.

“I need to know from you, did you authorize this article? Were you aware of it? Did you authorize it?” an agent asked McCabe,

The agent then described his response: “And as nice as could be, he said, ‘Yep. Yep I did.’”

The investigator then said that “things had suddenly changed 180 degrees with this” after McCabe’s admission, which turned his initial denials into a potential crime.

“In our business, we stop and say, look, now we’re getting into an area for due process,” the agent said.

“I was very careful to say… with all due respect, this is what you told us. This has caused us some kind of, you know, sidetracking here now with some information other people have told us,” the agent said, growing increasingly frustrated.

“I remember saying to him, at, I said, ‘Sir, you understand that we’ve put a lot of work into this based on what you told us,’” the agent said. Read more at NY Post