President Trump twice gave James Comey alibis for why a salacious report about the 2013 Miss Universe pageant in Moscow involving hookers couldn’t be true — telling the then-Top G-man that he hadn’t stayed overnight in the Russian capital.

But a Bloomberg report on Monday that scrutinized flight schedules and social media posts showed that Trump arrived in Moscow early Friday morning Russia time — and didn’t return to the Big Apple until very early Sunday morning New York time.

The flight records combined with existing accounts and Trump’s own social media posts, they show that Trump was on the ground in Russia for 45 hours and 43 minutes.

According to the contemporaneous memos Comey wrote about his conversations with Trump that the Justice Department gave to Congress last week, the president twice said he had not stayed overnight in the Moscow Ritz-Carlton.

The denial aimed at refuting an unverified charge in the dossier compiled by former British spy Christopher Steele that Russian prostitutes in Trump’s presence defiled a bed in the presidential suite where the Obamas had stayed.

Trump’s first denial came over dinner at the White House in late January 2017.

“He said he arrived in the morning, did events, then showered and dressed for the pageant at the hotel,” and then left for the event, Comey wrote.

“Afterwards, he returned only to get his things because they departed for New York by plane that same night.”

On the second occasion in February 2017, Trump “explained, as he did at our dinner, that he hadn’t stayed overnight in Russia during the Miss Universe trip,” Comey wrote.

But the records show that the future president’s journey to Moscow began in North Carolina, where he attended a birthday tribute to evangelist Billy Graham on Thursday, Nov. 7, 2013.

After the event, Trump flew to Moscow on a private jet owned by Phil Ruffin, his partner in the Trump International Hotel and Tower in Las Vegas, the New York Times reported in January 2017.

The flight records show that the jet took off from Asheville at 9:15 p.m. on Thursday, Nov. 7, bound for Moscow’s Vnukovo International Airport.

The Bombardier jet landed in Moscow at 6:15 a.m. on Friday, Nov. 8. From Vnukovo airport, it’s less than an hour’s drive to the Ritz-Carlton hotel, where Trump stayed, according to the Bloomberg report.

Trump surfaced online later that day in a Facebook post by the restaurant Nobu Moscow.

The next day, Saturday, Nov. 9, Facebook posts showed Trump at the Ritz during the day, and in the afternoon he tweeted that he’d gotten a tour of Moscow.

That evening, he attended the Miss Universe pageant, followed by an after-party whose scheduled start time was 1 a.m. — by that time, Sunday, Nov. 10.

Ruffin’s Bombardier took off from Vnukovo airport at 3:58 a.m. Moscow time, which is seven hours ahead of Eastern Standard Time, the records show.

When the jet touched down at Newark Liberty Airport, it was still Sunday morning, 4:11 a.m. New York time.

That evening, Trump tweeted about his return, “I just got back from Russia-learned lots & lots. Moscow is a very interesting and amazing place!”

The president has vehemently denied that he had anything to do with prostitutes and has trashed the Steele dossier as a hoax paid for by the Democratic party.

The party paid a company called Fusion GPS, which hired Steele, for opposition research on Trump that included the allegations.