President Trump wanted then-FBI Director James Comey to investigate the infamous pee-tape allegations to reassure First Lady Melania Trump that he hadn’t actually paid Russian hookers to urinate on a hotel bed, the former top G-man claims in his new book.

“He brought up what he called the ‘golden showers thing’ . . . adding that it bothered him if there was ‘even a 1 percent chance’ his wife, Melania, thought it was true,” Comey writes in “A Higher Loyalty.”

“He just rolled on, unprompted, explaining why it couldn’t possibly be true, ending by saying he was thinking of asking me to investigate the allegation to prove it was a lie. I said it was up to him.”

Comey says the conversation took place at a private dinner on Jan. 27, 2017, days after the publication of an intelligence dossier alleging the Kremlin had a tape of Trump in 2013 paying prostitutes to perform the dirty deed on a bed in a Moscow Ritz-Carlton suite once occupied by President Barack Obama.

Comey recalls privately wondering why Melania might think there was even a 1 percent chance the allegation was true, noting there was “zero chance” his own wife would believe such a claim.

“In what kind of marriage, to what kind of man, does a spouse conclude there is only a 99 percent chance her husband didn’t do that?” Comey writes.

He says he warned Trump an investigation might “create a narrative that we were investigating him personally.”

Trump replied that Comey “might be right” but kept asking him to consider the idea, according to the book.

It wasn’t their only uncomfortable conversation about the “golden showers thing.”

During a call on Jan. 11, 2017, Comey says, Trump launched into an explanation about how he hadn’t even stayed overnight in Moscow on the date in question.

“Another reason you know this isn’t true: I’m a germaphobe. There’s no way I would let people pee on each other around me, no way,” he quotes Trump as saying.

Comey notes “the activity” wouldn’t have required an overnight stay, and speculates that the presidential suite at the Moscow Ritz-Carlton was probably spacious enough for a germaphobe to have kept a “safe distance” from it.

It came up a fourth time on March 30, 2017, when Comey says Trump called to ask him to “get out” that he wasn’t personally under investigation in the FBI’s probe into Russia’s election meddling.

“Can you imagine me, hookers?” Comey says Trump told him before adding “he has a beautiful wife and the whole thing has been very painful to her.”