They called it “the gorilla in the room.”

Donald Trump’s desire to meet Vladi­mir Putin was so fierce that as Trump and his team prepared for their 2013 trip to Moscow to host the Miss Universe pageant they strategized about how the American reality-television star might be able to huddle with the Russian president.

As soon as the deal was struck for Miss Universe to take place in Russia, pageant president Paula Shugart told Rob Goldstone, a publicist and fixer who helped bring the pageant to Russia, “Oh, God, he’s going to want to meet Putin,” according to Goldstone’s testimony to the Senate Judiciary Committee released Wednesday.

“It was the gorilla in the room that had to be addressed, but there seemed to be no answer to address it,” Goldstone told the committee.

Negotiations for a face-to-face meeting began with a written request from Trump Tower to the Kremlin, included a personal call with Putin’s top spokesman and “went down to the wire,” Goldstone recalled. Once Trump landed in Moscow, he lavished praise on Putin (“strong”) as compared to then-U. S. President Obama (“weak”) at a reception.

Trump and Putin did not end up meeting because, according to Goldstone, Putin was too busy receiving the new king of Holland. Still, details about the American businessman’s failed courtship of the Russian autocrat — some of which were freshly revealed in Goldstone’s testimony and others that were reported by The Washington Post two years ago — illustrate the depth and tenure of Trump’s infatuation, which predated the 2016 presidential campaign during which he routinely praised Putin.

Trump’s long-held admiration of Putin has been a source of suspicion and held up by critics as evidence that he and his campaign associates welcomed help from the Russians in defeating Democrat Hillary Clinton, even if they did not directly coordinate activity with Putin’s government. Trump repeatedly has insisted that there was “no collusion,” something special counsel Robert S. Mueller III is investigating.

Trump’s attraction to strongmen is not limited to Putin. He has praised Egyptian President Abdel Fatah al-Sissi, Thailand Prime Minister Prayuth Chan-ocha, Turkish President Recep Tayyip Erdogan and Philippine President Rodrigo Duterte, among others.

But Trump has held a singular affection for Putin, complimenting him again and again as a strong leader because he exerts almost absolute authority in Russia, and taking care not to criticize or antagonize him personally.

“He has this strange fascination not only with the strongmen, but the almost retro male chauvinist culture that they have still in Russia,” said Evelyn Farkas, a former deputy assistant secretary of defense for Russia in the Obama administration. “I think that Trump thinks he sees some of himself in Putin, this macho facade of being in control.”

Michael McFaul, who was the U.S. ambassador to Russia at the time of Trump’s visit, said some visiting American business executives worked with the embassy to arrange meetings there but Trump did not.

“To do anything in Russia requires Putin to be on your side,” he said. “That’s why all of these people are seeking to meet with him.”

But Putin only rarely meets with Americans. During his two years as ambassador, McFaul recalled, only three Americans outside of the government got an audience with Putin: former secretary of state Henry Kissinger; then-ExxonMobil chief executive Rex Tillerson, who would become Trump’s first secretary of state; and actor Steven Seagal, known for his outspoken support for Putin.

“Every billionaire who comes to Moscow wants to meet with Putin and most of them don’t get the chance,” McFaul said.

As Farkas put it, “To Putin, Trump was not on the A-team.”

Putin said in an interview in March that he did not know until after the fact that Trump had visited Moscow, despite efforts by Trump and his associates to arrange a meeting through Putin’s staff.

“Donald came here to Russia when he was not even nominated,” Putin told Megyn Kelly of NBC News. “I did not even know that he had been to Russia. I learned about it only afterward, when I was told that as it turned out he had been to Russia.”

Goldstone testified to the Senate committee that when the deal was nearly completed to bring the Miss Universe pageant to Moscow following meetings in Las Vegas in June of 2013, there was an immediate effort to “determine if and when a meeting could or would take place” between Trump and Putin. That is when “it first reared its ugly head,” he recalled.

Goldstone said that he and Shugart worked through singer Emin Agalarov, who told them the meeting would have to be arranged by his father, Aras Agalarov, who Emin Agalarov felt had the necessary gravitas. Emin Agalarov informed them that an official request would have to be made in writing by Trump and delivered through Aras Agalarov.

Trump sent a personal letter to Putin inviting him to the beauty pageant and, as The Washington Post first reported in March, the real estate magnate scrawled a postscript at the bottom of the typed letter that said he looked forward to seeing “beautiful” women during his trip to Moscow.

It was unclear whether Agalarov delivered the letter to Putin or whether Putin responded.

Goldstone told the Senate committee that on the day of the pageant, around 4 p.m., a call came in to Aras Agalarov from Dmitry Peskov, Putin’s top spokesman.

The Agalarovs, Goldstone, Shugart and bodyguard Keith Schiller gathered with Trump in a conference room at Crocus Expo, the exhibition center where the pageant was being staged, as Peskov explained to Aras Agalarov that Putin would not be able to meet with Trump because his visit with the Dutch king was running late, Goldstone testified.

“A lot of Russian words” were exchanged, Goldstone recalled. Peskov invited Trump to attend the Olympic Winter Games in February 2014 in Sochi “and said he’d be happy to meet him there or at any future time,” Goldstone said, an offer Trump did not accept.

Aras Agalarov told The Post in a 2016 interview that Putin sent Trump “a friendly letter,” along with a Fedoskino box, saying he was grateful the pageant was in Moscow.

Although they did not meet, Trump talked about Putin during his 2013 visit. At a reception at Nobu, a trendy Japanese restaurant in Moscow, Trump was asked about his views on Russia, its economy and its president.

“I remember him saying specifically, ‘You have a very strong leader. Our leader is weak,’ ” Goldstone testified about Trump. “And then he emphasized the word again. He goes, ‘Weak. We need a strong leader.’ ”

Two years later, another opportunity to meet Putin was dangled before Trump. Goldstone emailed Trump’s personal secretary, Rhona Graff, on July 22, 2015, just six days after Trump launched his presidential campaign, inviting Trump to attend Aras Agalarov’s 60th birthday party on Nov. 8 of that year in Moscow.

Graff responded that Trump would be “honored” to be invited, but it was “highly unlikely” he would have time to visit Moscow because of the campaign.

“I totally understand,” Goldstone replied, “unless maybe he would welcome meeting with President Putin, which Emin would set up.”

Trump did not make it to Agalarov’s party in Moscow. He spent that evening in New York, at NBC’s Rockefeller Center studios as the guest host of “Saturday Night Live.”

Ellen Nakashima and Karen DeYoung contributed to this report.