The federal judge who presided over former National Security Adviser Michael Flynn’s case last year before mysteriously being recused had a personal relationship with anti-Trump FBI official Peter Strzok, according to text mesages obtained and reviewed by Fox News.

The revelations about U.S. District Court Judge Rudolph Contreras are found in a new batch of text messages between Strzok and his FBI paramour, Lisa Page.

Contreras was appointed to the Foreign Intelligence Surveillance Court (FISC) in 2016, a topic of conversation between Strzok and Page.

“Rudy is on the FISC! Did you know that?” Page texted Strzok on July 25, 2016. “Just appointed two months ago.”

“I did," Strzok replied. "We talked about it before and after. I need to get together with him.”

Strzok investigated matters of counterintelligence at the FBI, which typically went through the FISC.

Texts reflect Page asking why Strzok hadn’t told her about Contreras being on the FISC. Strzok said he thought he had shared the information.

In the texts, Strzok mentioned "a graduation party" he and Contreras both recently attended.

He also texted about the important of "being circumspect in talking to him in terms of not placing him into a situation where he’d have to recuse himself.”

Page replied that she couldn’t “imagine either one of you could talk about anything in detail meaningful enough to warrant recusal.”

Page added: “Standards for recusal are quite high. I just don’t think this poses an actual conflict. And he doesn’t know what you do?”

Strzok replied: “Generally he does know what I do. Not the level or scope or area. But he’s super thoughtful and rigorous about ethics and conflicts.”

Flynn pleaded guilty before Contreras in December 2017 to making false statements to the FBI as part of Special Counsel Robert Mueller’s investigation into Russian meddling in the 2016 presidental campaign and potential collusion with Trump campaign associates.

Strzok, who briefly served on the special counsel’s team before being reassigned to the FBI’s human resources division, oversaw the bureau's interviews with Flynn. That means he was likely one of the FBI officials involved in the conversations where Flynn is accused of making a false statement about his communications with Russians.

Days after Flynn’s guilty plea, Contreras was recused from the case, replaced by Judge Emmet Sullivan. No explanation for the recusal has been given up to this point. But experts think the relationship with Strzok may provide that missing piece of the puzzle.

“That explains why he recused himself,” former U.S. Attorney for the District of Columbia Joe diGenova told Fox News on Friday. “He knew he was a friend of Strzok’s when the case came to him. He should allow Flynn to withdraw the guilty plea.”

Contreras “never should have taken the case,” diGenova told Fox News. He noted the timing of Contreras' recusal, suggesting he made the move just as the Strzok-Page texts surfaced in the press.

Flynn pleaded guilty on Dec. 1. Reports began to surface of Strzok sending anti-Trump texts to Page on Dec. 2. Contreras recused himself from the case on Dec. 7.

“Contreras violated the canons of judicial ethics,” diGenova said. “If he knew Strzok was in charge of espionage, he never should have even gotten near it.”

A spokesman for Mueller's probe declined to comment.

Fox News’ Peter Doocy contributed to this report.