WASHINGTON — President Trump wasted no time on Wednesday calling the newly named crown prince of Saudi Arabia, Mohammed bin Salman. Less than 24 hours after King Salman elevated Prince Mohammed, his 31-year-old son, Mr. Trump offered congratulations and celebrated the monarchy’s cooperation in rooting out terrorist financing and other issues.

Even more than Karen Handel, the Republican who won a hotly contested House seat in a special election in Georgia this week, Prince Mohammed was Mr. Trump’s anointed candidate — in this case, for the byzantine struggle to control the House of Saud.

Mr. Trump views Prince Mohammed as a crucial ally in his effort to cement a Sunni Muslim alliance in the Persian Gulf. The prince, who also serves as the Saudi defense minister, favors a confrontational line toward Iran, which dovetails with the Trump administration’s hostile stance toward Tehran. And he is spearheading Saudi Arabia’s embargo of neighboring Qatar, which Mr. Trump has praised because he, like the Saudis, accuses the Qataris of financing extremist groups.

The young prince is also a favorite of the president’s son-in-law, Jared Kushner.

Mr. Kushner began cultivating Prince Mohammed soon after Mr. Trump’s election. When the prince visited Washington in March, he dined with Mr. Kushner and his wife, Ivanka Trump, at their home. When the couple joined Mr. Trump on his visit to Saudi Arabia last month, the prince returned the invitation and hosted Mr. Kushner and Ms. Trump for a dinner at his house.

“There’s a certain compatibility there,” said Jon B. Alterman, the director of the Middle East Program at the Center for Strategic and International Studies in Washington. “The president and his entourage think fellow billionaires who have an itch to get things done make the world go ‘round.”

Mr. Kushner and Prince Mohammed, senior officials said, worked closely together to choreograph Mr. Trump’s trip to Saudi Arabia, which yielded a renewed commitment by dozens of Arab and Muslim leaders to combat extremism in their countries and to turn off the financial spigot to extremist groups.

For Mr. Trump’s aides, that trip ranks as a highlight of his foreign policy so far, and they credit the prince for what one senior official described as under-promising and over-delivering.

Prince Mohammed’s elevated status was apparent in the earliest days of the Trump administration. Senior American officials said they wanted the United States to help Saudi Arabia with its campaign in Yemen against the Iranian-backed Houthi rebels, in part because the success or failure of the military campaign could affect the prince’s fortunes in the kingdom’s succession battle.

During the prince’s first visit to the White House, in March, the president welcomed him with a meeting in the Oval Office and a formal lunch in the State Dining Room. The next day, Prince Mohammed spent four hours with Defense Secretary Jim Mattis at the Pentagon.

Mr. Kushner also hopes for Prince Mohammed’s backing, or at least his blessing, in a peace initiative between Israel and the Palestinians. On Wednesday, Mr. Kushner made his first major foray into the process, meeting in Jerusalem with Prime Minister Benjamin Netanyahu of Israel and in the West Bank with Mahmoud Abbas, the president of the Palestinian Authority.

“The United States officials and Israeli leadership underscored that forging peace will take time,” White House officials said in a statement. But administration officials said the process would be helped if major Arab countries, notably Saudi Arabia, signed on to the concept of an agreement.

Middle East experts said that Prince Mohammed believes Saudi Arabia should have a normal relationship with Israel in the future. But several expressed doubt that the prince would want the Saudis to be an important component of an Israeli-Palestinian negotiation.

While the Trump administration clearly views Prince Mohammed as a reformer — pointing to Vision 2030, his ambitious blueprint to modernize Saudi Arabia’s economy and society — others warned that the White House could be in for a disappointment.

“There are other people who are more circumspect,” Mr. Alterman said. “They wonder if he has the right temperament. They wonder if he has the right political skills.”

That ambivalence ran through the Obama administration, which was caught off guard by the rapid rise of King Salman’s favorite son. Prince Mohammed, unlike other prominent royals, was not educated in the West and had not had a track record of government service, and he was nearly unknown in Washington when he ascended to the position of deputy crown prince in 2015.

He also assumed the title of defense minister, and almost immediately became the public face of the kingdom’s hastily launched military campaign against the Houthis in Yemen. The chaotic early months of the campaign gave him a reputation in some parts of the Obama administration as reckless and hotheaded.

There was also the problem of finding someone in Washington to develop a relationship with the young prince. Prince Mohammed’s natural counterpart on the American side, Defense Secretary Ashton B. Carter, had little inclination to spend time nurturing ties to the prince.

Secretary of State John Kerry assumed that mantle, inviting Prince Mohammed to his Georgetown home for an iftar dinner and meeting with the prince in May 2016 on the Serene, a luxury yacht that the prince bought from a Russian billionaire.

Still, there were issues that could never be bridged. A particular point of friction was the Obama administration’s attempts at rapprochement with Iran.

At a meeting in Turkey in November 2015 between President Barack Obama and King Salman, the prince leapt into what American officials said was a lecture on what he saw as the administration’s failures in the Middle East.

There are no such differences with the Trump administration, however. Saudi officials have lavished praise on Mr. Trump for his bombing of Syria and his hawkish stance toward Iran.

The Trump administration also seems to have had little concern about showing favoritism in the rivalry between the prince and Prince Mohammed bin Nayef, who until Wednesday had been next in line to the Saudi throne.

Prince bin Nayef had close ties to national security officials in the Obama administration. But the political change in the United States this year brought a reversal of fortune for Prince bin Nayef, who lost many of his contacts.

The March visit to the White House by Prince Mohammed so angered Prince bin Nayef that he made his annoyance known to the American government using unofficial channels.