President Biden, who as a candidate vowed to make Saudi Arabia a “pariah” in response to the assassination of a prominent dissident, has decided to travel to Riyadh this month to rebuild relations with the oil-rich kingdom at a time when he is seeking to lower gas prices at home and isolate Russia abroad.

While the timing was still being discussed, Mr. Biden planned to add the visit to a previously scheduled trip to Europe and Israel, administration officials said, asking for anonymity because the trip had not been formally announced. During his stop in Riyadh, the president will meet with Crown Prince Mohammed bin Salman, who was deemed responsible for the dismemberment of the dissident, the Washington Post columnist Jamal Khashoggi. Mr. Biden will also meet with the leaders of other Arab nations, including Egypt, Jordan, Iraq and the United Arab Emirates.

The visit represents the triumph of realpolitik over moral outrage, according to foreign policy experts. In the wake of Russia’s invasion of Ukraine, Mr. Biden has found it necessary to court other energy producers to replace oil from Moscow and stabilize world markets. The group of oil-producing nations called OPEC Plus, led by Saudi Arabia, announced on Thursday that it would increase production modestly in July and August. American officials expect the group to do more in the fall, but it may not be enough to bring down prices at the pump before November’s congressional elections.

The Biden administration had already been stepping up cooperation with Saudi Arabia on a variety of issues even before Russia’s invasion of Ukraine roiled world energy markets, particularly in seeking an end to the eight-year-old Saudi-led war in neighboring Yemen. A two-month-old truce was extended on Thursday, and Mr. Biden praised Saudi leaders for their role. “Saudi Arabia demonstrated courageous leadership by taking initiatives early on to endorse and implement terms of the U.N.-led truce,” he said in a statement.

The diplomacy and the president’s trip signify an effort to repair the rupture in relations stemming from the 2018 death of Mr. Khashoggi. American intelligence concluded that Prince Mohammed, the de facto leader of the kingdom, ordered the hit team that killed and dismembered Mr. Khashoggi at a consulate in Istanbul.

While President Donald J. Trump remained close with the Saudis, Mr. Biden promised to take a different tack if elected to the White House. He said that he would make the Saudis “pay the price, and make them in fact the pariah that they are,” while saying that there was “very little social redeeming value in the present government in Saudi Arabia.”

After taking office, Mr. Biden released the intelligence report on Mr. Khashoggi’s murder as a statement of accountability and imposed sanctions on some of those involved in the killing. But he took no action against Prince Mohammed, drawing a limit to how far he was willing to break with Riyadh.

The administration argues that it ended the Trump team’s policy of blank checks for Riyadh but was not willing to end America’s nearly eight-decade-old friendship with Saudi Arabia, which has been an important ally on a variety of fronts.

“Saudi Arabia is a critical partner to us in dealing with extremism in the region, in dealing with the challenges posed by Iran, and also I hope in continuing the process of building relationships between Israel and its neighbors both near and further away through the continuation, the expansion of the Abraham Accords,” Secretary of State Antony J. Blinken said on Wednesday at an event marking the 100th anniversary of Foreign Affairs magazine. He said human rights are still important but “we are addressing the totality of our interests in that relationship.”

The Abraham Accords, sealed under the auspices of Mr. Trump, established normal diplomatic relations between Israel and several Arab states, including the United Arab Emirates and Bahrain. But Saudi Arabia remains the elusive target, one that would go a long way toward validating Israel’s status in the region if it were to formally recognize the Jewish state.

Prince Faisal bin Farhan al-Saud, the Saudi foreign minister, sounded optimistic recently about eventually joining the accords but maintained that progress had to be made first on resolving Israel’s long-running conflict with the Palestinians.

“We always envisioned that there will be full normalization with Israel, and I’ve said before that a full normalization between us and Israel, between the region and Israel, will bring immense benefits,” he said last week at the World Economic Forum in Davos, Switzerland. “We won’t be able to reap those benefits unless we address the issue of Palestine.”

Mr. Biden was already prepared to end the isolation of Prince Mohammed as far back as October when he expected to encounter the Saudi leader at a meeting of the Group of 20 leaders and most likely would have shaken hands. But the prince did not attend.

The newly planned stop in Riyadh, previously reported by David Ignatius, a columnist for The Post, produced quick criticism from human rights groups. They denounced any diplomatic rehabilitation of Prince Mohammed.

“Right now, Biden is buffeted by intersecting crises, and certain human rights priorities are suffering as a result,” said Suzanne Nossel, the chief executive of PEN America, a group that defends free expression around the world. “The harder it gets to put human rights above politics, the more consequential it is for the world to witness a leader willing to do so.”

An advocacy group called 9/11 Families United, representing relatives of victims from the terrorist attacks of Sept. 11, 2001, sent the president a letter on Thursday urging him to press Saudi leaders on ties with the hijackers. Mr. Biden last year ordered the declassification of documents from the Sept. 11 investigation into Saudi involvement.

“No reset of our nation’s relationship with Saudi Arabia can or should be possible without proper reconciliation for the attacks on Sept. 11, 2001,” the group said in the letter.

The two countries have been trading envoys in recent months. Brett McGurk, the White House coordinator for the Middle East and North Africa, was in Saudi Arabia last week to discuss the presidential visit and other issues. Khalid bin Salman, the deputy defense minister and a brother of the crown prince, visited Washington last month and met with Jake Sullivan, the president’s national security adviser.

The administration was pleased that Saudi Arabia joined an American-backed United Nations resolution condemning Russia in March and that more recently Riyadh sent a message pressing Moscow to release food exports blockaded at the Ukrainian port of Odesa.

The Saudis remain embittered by the Biden presidency, however. In addition to releasing the Khashoggi report and the Sept. 11 documents, the Biden administration removed the terrorism designation of Yemen’s Houthi rebels, reversing a Trump-era policy valued by the Saudis.

Riyadh has also bristled at Mr. Biden’s focus on accelerating the shift away from fossil fuels to renewable energy, a process that would undermine its business model. And looming in the background has been the administration’s push to revive the Iran nuclear deal, which the Saudis fear could empower their regional nemesis.

In an interview last month with Arab News, a Saudi news outlet, Prince Turki al-Faisal, a senior member of the royal family and son of a former king, laid out a number of the kingdom’s grievances against their most important ally, saying that the Saudis felt “let down” by the United States.