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 hosted Mr. Kushner and Ms. Trump for a dinner at his house.