Taking a cue from a GOP ally, President Trump on Sunday attacked a former senior Justice Department official appointed by a federal judge to review the FBI’s proposed wiretap application reforms in the wake of a critical inspector general report.

“You can’t make this up! David Kris, a highly controversial former DOJ official, was just appointed by the FISA Court to oversee reforms to the FBI’s surveillance procedures. Zero credibility. THE SWAMP!” Trump tweeted.

In his tweet, Trump seemed to reference an interview between Rep. Devin Nunes (R-Calif.) and host Maria Bartiromo on Fox News’s “Sunday Morning Futures.” On the show, Nunes accused Kris of “defending dirty cops” and “accusing [Nunes] of federal crimes.”

“You can’t make it up,” Nunes said. “I guess we’re just going to have to abolish this whole FISA system at this point and try to build something new.”

FISA, or the Foreign Intelligence Surveillance Act, is the 1978 law that undergirds national security investigations and governs surveillance undertaken in the United States and of U.S. people abroad.

Kris is a respected former assistant attorney general for national security who has served in both Republican and Democratic administrations. He is one of several “amici” or experts named to advise the Foreign Intelligence Surveillance Court on complex cases, and he co-authored what is considered the definitive treatise on national security surveillance law — “National Security Investigations and Prosecutions.”

The court’s presiding judge, James E. Boasberg, on Friday named Kris to help the court assess the steps the FBI has taken and plans to take to address the flaws exposed by Inspector General Michael Horowitz in his review last month of a wiretap application for former Trump campaign aide Carter Page.

“David is a true national security professional and has served the Justice Department with great distinction under both Democratic and Republican administrations,” said Kenneth Wainstein, a former assistant attorney general for national security under the George W. Bush administration, and a former FBI general counsel. “There is nobody who knows more or cares more about our national security processes, their effectiveness and adherence to our laws and constitution.”

Nunes’s ire at Kris was provoked by comments Kris made in blog posts after Nunes released a memo in 2018 alleging FBI and Justice Department abuses in seeking to wiretap Page as a suspected agent of the Russian government.

“The Nunes memo was dishonest. And if it is allowed to stand, we risk significant collateral damage to essential elements of our democracy,” Kris wrote on the blog Lawfare.

Kris also took issue with Nunes’s claim then that the FBI misled the court about Christopher Steele, a former British spy who was a source of information in the wiretap application and renewal requests. “Today we know that it was not true,” wrote Kris, who in the early 2000s was involved in creating new FBI rules to make national security wiretap applications more accurate.

Horowitz’s report, however, concluded that Steele’s information “played a central and essential role” in the decision to seek a wiretap on Page.

“If David was guilty of anything, it was the sin of assuming that everyone in government has the same integrity and good faith that he does,” said Stephen Vladeck, a law professor at the University of Texas at Austin. “There is an important lesson here that some of us have been warning about for years — about not being quite so forgiving of the government.’’

Kris is not shy about criticizing the government when he feels it is overstepping legal bounds. In 2006, he publicly rebuked the Bush administration over its legal justifications for warrantless domestic wiretapping.

“But that is all the more reason why David’s the right person for this new role,” Vladeck said, “because unlike someone who’s going to come in as a natural critic, David is someone who is going to understand what the real problems are and what the invented ones are.”

Kris was asked to submit his assessment to the court by Jan. 31.

Julie Tate contributed to this report.