White House Counsel Don McGahn is cooperating with special counsel Robert Mueller and has met with investigators at least three times in nine months as the FBI investigates possible obstruction of justice on the part of President Donald Trump, the New York Times reported Saturday.

According to the Times, the top White House lawyer has voluntarily interviewed with investigators for 30 hours this year and has given Mueller’s team a “clear view” of episodes at the heart of their inquiry, including the firing of FBI director James Comey.

“A prosecutor would kill for that,” Solomon L. Wisenberg, a deputy independent counsel who investigated Bill Clinton during Whitewater in the 1990s, told the paper. “It would have been like having the keys to the kingdom.”

Mueller, who has led the probe since Trump terminated Comey in May 2017, is examining potential collusion between the president’s 2016 campaign and the Kremlin.

Trump routinely rails against the investigation, describing it as a “witch hunt” and repeatedly admonishing Attorney General Jeff Sessions for what he sees as a failure to protect him from investigators.

His attacks on Sessions, along with his demands that he personally end the probe, are being investigated as part of a possible obstruction of justice case, as are his apparent calls for loyalty from those leading the inquiry.

McGahn’s cooperation could pose a significant problem from Trump and those close to him. The White House counsel has been privy to the president’s public and private rage at the probe, and may be able to provide key information about any potentially illegal attempts Trump may have taken to undermine it. As presidential historian Michael Beschloss noted in the Times report, it was critical information provided to investigators by former White House Counsel John Dean in 1973 that helped precipitate Richard Nixon’s downfall.

According to the Times, McGahn worried Trump would put him in legal jeopardy and began cooperating with Mueller so as not to end up like Dean, who was implicated in the Watergate coverup and served four months in prison after pleading guilty to a count of obstruction of justice.

It’s not clear if McGahn’s cooperation with Mueller, whom Trump has accused of being biased against him, has strained his relationship with the president. It’s also unclear how aware the administration had been of the counsel’s cooperation.

Maggie Haberman, who reported the Times story with Michael S. Schmidt, tweeted Saturday that Trump allies have “for months questioned [the] veracity of our reporting ... and WH didn’t understand extent of it.”

Both those close to Trump and the White House, according to Haberman, have not seemed to be fully aware of how much McGahn has told investigators about perhaps one of the most charged reported confrontations between him and the president.

According to a Times report back in January, Trump — fuming at the ever-intensifying Russia investigation — ordered McGahn in the summer of 2017 to fire Mueller, but the White House counsel threatened to resign rather than carry out the order and the president backed down.

Trump dismissed the bombshell report as “fake news,” but that episode, too, has reportedly become a flashpoint being investigated by the special counsel.