Ex-FBI Director James Comey said “it’s possible” President Trump was with hookers “peeing on each other” in Moscow, according to excerpts of a new interview released Friday.

“I honestly never thought these words would come out of my mouth, but I don’t know whether the current president of the United States was with prostitutes peeing on each other in Moscow in 2013,” Comey said in a “20/20” episode set to air Sunday. “It’s possible, but I don’t know.”

The former top G-man recalled the moment Trump floated the idea of investigating the pee-tape allegations during a private dinner Jan. 27, 2017 — saying it would bother him if there was “even a 1 percent chance” that wife Melania believed them.

“And I remember thinking, ‘How could your wife think there’s a 1 percent chance you were with prostitutes peeing on each other in Moscow?’” Comey said. “I’m a flawed human being, but there is literally zero chance that my wife would think that was true. So, what kind of marriage to what kind of man does your wife think [that] there’s only a 99 percent chance you didn’t do that?”

The anecdote echoes the same one detailed in Comey’s new book, “A Higher Loyalty: Truth, Lies and Leadership,” which will hit shelves April 17.

Trump told Comey, “I may order you to investigate that,” but Comey advised caution.

“I said, ‘Sir, that’s up to you. But you’d want to be careful about that, because it might create a narrative that we’re investigating you personally, and second, it’s very difficult to prove something didn’t happen,’” Comey recalled on “20/20.”

Comey said it was an “almost out-of-body experience” when it came to talking to the then-president-elect about the 35-page dossier compiled by operative Christopher Steele that claimed the Kremlin had a tape of Trump paying prostitutes to urinate on a hotel bed.

“I was floating above myself, looking down, saying, ‘You’re sitting here, briefing the incoming president of the United States about prostitutes in Moscow,’” Comey recalled.

He added, “I started to tell him about the allegation was that he had been involved with prostitutes in a hotel in Moscow in 2013 during the visit for the Miss Universe pageant and that the Russians had filmed the episode, and he interrupted very defensively and started talking about it, you know, ‘Do I look like a guy who needs hookers?’”

“And I assumed he was asking that rhetorically, I didn’t answer that, and I just moved on and explained, ‘Sir, I’m not saying that we credit this, I’m not saying we believe it. We just thought it very important that you know.’”

Comey first told Trump about the dossier during a Jan. 6, 2017, meeting at Trump Tower in Manhattan after a group of intelligence agency leaders told the president-elect that Russians had interfered with the election.

“President-elect Trump’s first question was to confirm that it had no impact on the election … and then the conversation, to my surprise, moved into a PR conversation about how the Trump team would position this, and what they could say about this, with us still sitting there,” Comey said. “And the reason that was so striking to me [is] that’s just not done. That the intelligence community does intelligence, the White House does PR and spin.”

No one in the room talked about what could be done to prevent the Russians from striking again, according to Comey.

“It was all, ‘What can we say about what they did and how it affects the election that we just had,’” he recalled.

Comey said that as of his firing in May, the allegations in the dossier were “unverified.”

He told Trump he couldn’t say whether the allegations were true.

“I said … ‘I’m not saying that I believe the allegations, I’m not saying that I credit it,’” Comey said. “I never said, ‘I don’t believe it,’ because I couldn’t say one way or another.”