Tom Barrack, former Deputy Interior Undersecretary in the Reagan administration, delivers a speech on the fourth day of the Republican National Convention on July 21, 2016 at the Quicken Loans Arena in Cleveland, Ohio.

The billionaire financier Tom Barrack was caught in a bind.

In April 2016, his close friend Donald J. Trump was about to clinch the Republican presidential nomination. But Mr. Trump's outspoken hostility to Muslims — epitomized by his call for a ban on Muslim immigrants — was offending the Persian Gulf princes Mr. Barrack had depended on for decades as investors and buyers.

"Confusion about your friend Donald Trump is VERY high," Ambassador Yousef al-Otaiba of the United Arab Emirates emailed back when Mr. Barrack tried to introduce the candidate, in a message not previously reported. Mr. Trump's image, the ambassador warned, "has many people extremely worried."

More from the New York Times:

Blood will tell, Part 1: Who Killed Mickey Bryan?

How Boots Riley infiltrated Hollywood

The evangelical fight to win back California

Not deterred, Mr. Barrack, a longtime friend who had done business with the ambassador, assured him that Mr. Trump understood the Persian Gulf perspective. "He also has joint ventures in the U.A.E.!" Mr. Barrack wrote in an email on April 26.

The emails were the beginning of Mr. Trump's improbable transformation from a candidate who campaigned against Muslims to a president celebrated in the royal courts of Riyadh and Abu Dhabi as perhaps the best friend in the White House that their rulers have ever had. It is a shift that testifies not only to Mr. Trump's special flexibility, but also to Mr. Barrack's unique place in the Trump world, at once a fellow tycoon and a flattering courtier, a confidant and a power broker.

During the Trump campaign, Mr. Barrack was a top fund-raiser and trusted gatekeeper who opened communications with the Emiratis and Saudis, recommended that the candidate bring on Paul Manafort as campaign manager — and then tried to arrange a secret meeting between Mr. Manafort and the crown prince of Saudi Arabia. Mr. Barrack was later named chairman of Mr. Trump's inaugural committee.

But Mr. Manafort has since been indicted by the special prosecutor investigating Russian meddling in the presidential election. The same inquiry is examining whether the Emiratis and Saudis helped sway the election in Mr. Trump's favor — potentially in coordination with the Russians, according to people familiar with the matter. Investigators have also asked witnesses about specific contributions and expenses related to the inauguration, according to people familiar with those interviews.

A spokesman for Mr. Barrack said he has been advised he is not a target of the special prosecutor. Investigators interviewed him in December but asked questions almost exclusively about Mr. Manafort and his associate Rick Gates, said a person familiar with the questioning.

Mr. Barrack has steered clear of any formal role in the administration; he has said he rebuffed offers to become treasury secretary or ambassador to Mexico. (He sought a role as a special envoy for Middle East economic development, but the idea never gained traction in the White House.)

Instead, he has continued making money, as he has for decades, working with the same Persian Gulf contacts he introduced two years ago to Mr. Trump. Mr. Barrack's company, known as Colony NorthStar since a merger last year, has raised more than $7 billion in investments since Mr. Trump won the nomination, and 24 percent of that money has come from the Persian Gulf — all from either the U.A.E. or Saudi Arabia, according to an executive familiar with the figures. Colony NorthStar has not disclosed the investors in its funds.

Mr. Barrack's email correspondence with Ambassador Otaiba, which has not previously been reported, was provided to The New York Times by an anonymous group critical of Emirati foreign policy, and it illustrates the formative role Mr. Barrack played as a matchmaker between Mr. Trump and the Persian Gulf princes.

Mr. Barrack's representatives did not dispute the authenticity of the emails. His spokesman said in a statement that Mr. Barrack "sees his business in the Middle East as a way to help political dialogue and understanding, not the other way around, and he does so through relationships that span as far back as the reign of even some of the grandfathers of the current regional rulers."

But having the ear of the president, say other executives and former diplomats who work in the Gulf, has only enhanced Mr. Barrack's stature in the region.

"He is the only person I know who the president speaks to as a peer," said Roger Stone, a veteran Republican operative who has known both men for decades. "Barrack is to Trump as Bebe Rebozo was to Nixon, which is the best friend," Mr. Stone added, referring to the wealthy real-estate developer who is best remembered for his closeness to President Richard Nixon during his impeachment process.

Mr. Barrack's closeness to Mr. Trump extends to the president's family. By 2010, he had acquired $70 million of the debt owed by Mr. Trump's son-in-law, Jared Kushner, on his troubled $1.8 billion purchase of a skyscraper at 666 Fifth Avenue in New York. After a call from Mr. Trump, Mr. Barrack was among a group of lenders who agreed to reduce Mr. Kushner's obligations to keep him out of bankruptcy.

A month after his first outreach to Ambassador Otaiba, Mr. Barrack wrote again on May 26 to introduce Mr. Kushner, who was preparing for a role as a presidential envoy to the Middle East.

"You will love him and he agrees with our agenda!" Mr. Barrack promised in another email.

A billionaire buddy

Thomas J. Barrack Jr. and Donald J. Trump first met in the 1980s, and Mr. Barrack got the better of the encounters. He negotiated Mr. Trump into overpaying for two famous assets: a one-fifth stake in the New York department store chain Alexander's in 1985, and the entire Plaza Hotel in 1988. Mr. Trump paid about $410 million for the Plaza and later lost both properties to creditors.

But Mr. Barrack nonetheless parlayed the deals into a lasting friendship, in part by flattering Mr. Trump about his skill as a negotiator.

"He played me like a Steinway piano," Mr. Barrack recounted in a speech at the Republican convention.

At 71, Mr. Barrack is the same age as President Trump and shares his fondness for expensive trophies. He owns a 700-acre winery and polo ranch in the Santa Ynez Valley in California, sold a seven-bedroom mansion in Santa Monica last year for $38 million, and snapped up an Aspen ski resort for a reported $18 million just in time for the start of the season.

Yet people who know him well say he still tells new acquaintances that he is truly honored to meet them, cheerfully doling out superlatives like "first-class," "amazing" and "brilliant." He invariably tells the story of his own success as a parable about luck and perseverance, never about talent.

He grew up speaking Arabic as the son of Lebanese immigrants to Los Angeles; his mother worked as a secretary and his father ran a grocery store in Culver City. By 1972 he had earned a law degree from the University of Southern California and he interviewed for a job with Nixon's personal lawyer, Herbert Kalmbach. As Mr. Barrack tells the story, he returned moments later to drop off a book about football that they had discussed, and his gesture won him a job over candidates with more prestigious degrees.

Dispatched to Saudi Arabia because of his Arabic skills, Mr. Barrack was enlisted as a squash partner for "a local Saudi," he often says, and the Saudi turned out to be a son of the king and his first big break in business.

In the decades to come, Mr. Barrack cultivated relationships across the region, once befriending an elderly Bedouin on a bus who turned out to be an executive of Aramco, the Saudi oil giant. Mr. Barrack invited his new Bedouin friend to stay with him in Newport Beach, Calif., while seeking a medical treatment, and the favor landed Mr. Barrack an assignment to help Aramco buy 375 Blue Bird school buses, the biggest deal in his life at the time.

His friends describe him as a concierge to the Persian Gulf royals, helping them buy American or European homes, looking after their children on visits to the West and vacationing with them at his home in the south of France. After his private equity firm bought a resort built by the Aga Khan on 35 miles of the Sardinian coast, Mr. Barrack, a Catholic, opened a halal restaurant to welcome Gulf royals who came by in their yachts.

As a young lawyer, Mr. Barrack once negotiated drilling rights with Ambassador Otaiba's father, who was then the Emirati oil minister. The emails show that Ambassador Otaiba later worked with Mr. Barrack to help seal a 2009 deal in which his private equity firm sold the L'Ermitage Raffles hotel in Beverly Hills to a joint venture half owned by an Abu Dhabi investment fund for $41 million. Three years later, Ambassador Otaiba invested $1 million in a fund that Mr. Barrack had set up to buy homes on the cheap after the real estate crash, according to the emails.

When Ambassador Otaiba worried about Mr. Trump's proposed Muslim ban — "even someone as nonjudgmental as I am, had a problem with that statement" — Mr. Barrack wrote back that Mr. Trump was "the king of hyperbole."

"We can turn him to prudence," Mr. Barrack wrote in an email. "He needs a few really smart Arab minds to whom he can confer — u r at the top of that list!"

A shift in policy

Mr. Barrack's efforts began to pay off. Mr. Kushner met Ambassador Otaiba in May 2016. Soon after, Mr. Barrack and Ambassador Otaiba began working to arrange a secret meeting between Mr. Manafort, who became Mr. Trump's campaign manager that June, and Deputy Crown Prince of Saudi Arabia, the dominant adviser to his father, King Salman.

Mr. Barrack had befriended Mr. Manafort in the 1970s, when they were both living in Beirut and working for Saudi interests. Early in 2016, when Mr. Trump faced the prospect of a contested nomination fight at the Republican convention, Mr. Barrack had recommended Mr. Manafort for the job of campaign manager. "The most experienced and lethal of managers" and "a killer," Mr. Barrack called him in a letter to Mr. Trump.

Prince Mohammed was widely seen as an ambitious protégé of the Emirati rulers, and in an email to the Emirati ambassador, Mr. Barrack presented a Manafort meeting as a prelude to a meeting with Mr. Trump.

"I would like to align in Donald's mind the connection between the U.A.E. and Saudi Arabia which we have already started with Jared," Mr. Barrack wrote to Ambassador Otaiba on June 21, 2016. "I think it is important that you be the center pin!!"

Mr. Barrack had competition. The Saudi prince had tried to reach the Trump campaign through "a midlevel person" at the rival private equity giant Blackstone, Mr. Barrack wrote in a follow-up email. "Obviously I would like the meeting to be arranged by you and me rather than Blackstone," Mr. Barrack told the ambassador.

Mr. Barrack also pitched Mr. Manafort on the value of the Emirati connection.

"Paul is totally programmed on the closeness and alignment of the U.A.E." and agreed to meet Prince Mohammed "because he is a friend of your boss and the U.A.E.," Mr. Barrack wrote.

The emails show that the meeting was scheduled for June 24, and that Mr. Manafort sought to meet at the prince's hotel to avoid the news media. But a spokesman for Mr. Barrack said that Mr. Manafort had canceled at the last minute for scheduling reasons.

Regardless, Mr. Barrack's advocacy apparently proved effective. The day after the meeting was scheduled, Mr. Barrack forwarded to the ambassador a message from Mr. Manafort with a "clarification" that modulated Mr. Trump's call for a Muslim ban.

A few weeks later, on July 13, Mr. Barrack informed Ambassador Otaiba that the Trump team had also removed a proposed Republican platform provision inserted to "embarrass" Saudi Arabia. The provision had called for the release of redacted pages about the kingdom in a report on the terrorist attacks of Sept. 11, 2001.

When Mr. Trump won in November, Ambassador Otaiba was eager to pull Mr. Barrack even closer. "We have a lot of things that we will have to do together. Together being the operative word," he wrote in a note congratulating Mr. Barrack on Mr. Trump's upset victory.

"Let's do them together," Mr. Barrack responded.

Later, Mr. Barrack attended a dinner party at Ambassador Otaiba's home with other Arab ambassadors and former American officials (the chef was from the world-renowned Inn at Little Washington). Mr. Barrack offered to make introductions in the new administration. "Tell me who is high on your hit list."

"Thanks to you, I'm in consistent contact with Jared and that has been extremely helpful, for both sides I think," Ambassador Otaiba wrote Mr. Barrack.

They celebrated again in May 2017, when Mr. Trump made his first foreign trip as president, to Riyadh in Saudi Arabia for an Arab summit meeting.

"It all started with you and JK and I so congratulations on a great beginning," Mr. Barrack wrote to Ambassador Otaiba, referring to Mr. Kushner by his initials.

Things go sour — but not for Barrack

Two weeks after the Riyadh meeting, Mr. Trump began to align himself firmly with the Saudis and Emiratis against their rivals around the region. When those two states imposed an embargo on their neighbor Qatar — home to a major United States air base — Mr. Trump broke with his own administration to throw his weight squarely behind the Saudis and Emiratis.

He quickly congratulated Prince Mohammed when he assumed the title of crown prince — and commended him again when he summarily detained about 200 businessmen and rivals in a consolidation of his power. This spring, Mr. Trump handed the Saudis and Emiratis an even greater victory by pulling out of the nuclear deal with their nemesis, Iran. In turn, the Gulf monarchs have made only pro forma protests against Mr. Trump's recognition of Jerusalem as the capital of Israel.

Yet many of the connections facilitated by Mr. Barrack have brought liabilities, too.

The linkages between Mr. Trump and the Saudis and Emiratis have come under new scrutiny. A few months after Mr. Barrack arranged the initial introductions, George Nader, a Lebanese American businessman and a top adviser to the de facto ruler of the U.A.E., met with the candidate's son Donald Trump Jr. at the Trump headquarters in New York. In that Aug. 3, 2016, meeting, Mr. Nader reported that the rulers of both Saudi Arabia and the United Arab Emirates supported the Trump campaign and offered their assistance, according to people familiar with the discussion.

Such help would have violated campaign laws, and Mr. Nader is now cooperating with the special prosecutor, who is examining that meeting as well as a string of others that followed, according to people familiar the matter.

Mr. Manafort has pleaded not guilty to charges of financial fraud and lying to federal investigators in connection with his work for Russian-backed interests in Ukraine. Mr. Gates, whom Mr. Barrack hired to help run the inauguration and then as a Washington consultant, has pleaded guilty to making false statements to investigators and agreed to cooperate with the special prosecutor.

Mr. Kushner has also given testimony to the special prosecutor.

But Mr. Barrack's business is still going strong, in part as a result of his continuing relations with the Saudis and Emiratis. When his company was looking for partners in its $400 million purchase last year of a landmark Los Angeles office tower, One California Plaza, it sold a $70 million stake to an Israeli insurance company. Another $70 million stake went to a state investment company controlled by the crown prince of Abu Dhabi, in the United Arab Emirates, according to a person familiar with the deal.

What is more, Mr. Barrack may profit more directly than ordinary shareholders or executives from the investments he helps bring in, because in some cases, according to Colony NorthStar filings, he earns the extra fees known as carried interest on profits from funds he raised — as if he were a partner in a private equity firm rather than merely a chairman of a publicly traded company.

Friends of Mr. Barrack argue that his long history of business in the Persian Gulf shows that the investments are unrelated to any White House connections.

Yet one thing has shifted.

Until recently, Mr. Barrack's most prominent Gulf customers were neither the Emiratis nor the Saudis — but their bitter rivals the Qataris, who bought the film studio Miramax and a Paris soccer team from him, among other marquee properties. During the campaign, Mr. Barrack reached out to the Qataris as well, helping set up a meeting between Mr. Trump and the emir of Qatar in Trump Tower in September 2016.

"Tom wanted Qatar to know he arranged it," said a person involved in meeting, "and he wanted Trump to know he arranged it."

But Mr. Trump's stance on the dispute with Qatar appears to have cast a shadow over Mr. Barrack's business there: None of the Gulf investments that Mr. Barrack's company has brought in since Mr. Trump's nomination have come from Qatar.

"We still consider Tom a friend and partner," said a senior Qatari official, speaking on the condition of anonymity to avoid angering the White House. "But with all the recent things that have happened we have suspicions about the level of his involvement in this crisis."