But instead of peace, the Middle East was battered by a wave of conflict in the days that followed, awash with recriminations and repression that suggested that, far from uniting the region, Trump's words had only aggravated its divides.
Qatar and Saudi Arabia launched a bizarre and unexpected war of words that highlighted their longtime competition for regional influence and their often sharply contrasting visions.
As that dispute raged last week, the leaders of Bahrain and Egypt embarked on unusually vicious crackdowns on political opponents at home, killing five people and arresting hundreds.
And leaders in Iran, Saudi Arabia's principal rival, where voters earlier this month reelected a reformist president, went on the offensive, condemning Trump's announcement of billions of dollars in weapons sales to the Saudis while revealing the existence of an underground ballistic missile facility.
Analysts said the tensions were almost surely a consequence of Trump's visit to Riyadh: a forceful American endorsement of Saudi leadership in the Arab world, punctuated by the weapons sales, which had stirred panic and anxiety among the kingdom's competitors and enemies while emboldening its loyal and authoritarian allies.
And Trump's appeal for a common stand against terrorism was unlikely to heal the rifts, analysts said: It was delivered to an audience of Arab leaders who have applied the term so broadly and casually — to violent militants as well as anti-government bloggers — as to render the word almost meaningless.
"Donald Trump now accepts the view of Saudi Arabia as a strategic bastion in the Arab and Islamic World," said Fawaz Gerges, a professor of Middle East studies at the London School of Economics. And his visit was "related" to the tumult that ensued, Gerges said.
"What you are seeing now is that the Saudi-led coalition feels empowered. They are on the offensive. It's a new era. Everyone has to toe the line and join this alliance," he said.
The consequences of the shift could trouble the region for years, he said, by intensifying proxy wars in Yemen or Syria, where Saudi Arabia and Iran have supported opposing sides, Gerges said.
New fronts also could ignite — between Israel and Hezbollah, Iran's ally, in places like southern Lebanon.
"All sides are preparing for the next round," Gerges said.
Iranian officials initially shrugged off Trump's vociferous anti-Iran comments in Riyadh, dismissing the summit as spectacle. Iran's Internet-savvy foreign minister, Javad Zarif, ridiculed the U.S.-Saudi arms deal on Twitter.
But in the days since, the Iranian government has adopted a more defiant tone, denouncing the raid in Bahrain against Shiite-led opposition activists as a direct consequence of Trump's visit.
On Thursday, Iran unveiled the country's third underground ballistic missile facility. Its ongoing missile production has been a source of contention between Iran and the United States.
"U.S. officials should know that whenever we need a missile test for technical reasons, we will test it, and we will not wait for their permission," Iranian President Hassan Rouhani said at a news conference in Tehran on Tuesday.
It was a departure from the conciliatory tone Rouhani took on the campaign trail, and came as a senior military aide to Iran's supreme leader also condemned the weapons deal as an attempt to destabilize the region.
As the Arab world braced for an escalating confrontation between Saudi Arabia and Iran, another fight broke out last week between Saudi Arabia and Qatar, whose long-standing rivalry has flared repeatedly since the Arab uprisings in 2011.
The genesis of the feud was a report published on the website of Qatar's state news agency on Wednesday. It quoted Qatar's emir as criticizing the messages that had emerged from the Riyadh conference, including the attacks by Trump and others on Iran and condemnations of Hamas and Hezbollah, the Palestinian and Lebanese militant groups.
Qatar later said that the emir had never spoken and that the state news agency had been hacked.
That did not prevent Saudi Arabia from launching days of scathing attacks on Qatar through Saudi media channels, which suggested it would not tolerate any divergence from the Saudi-led position.
In a column titled, "Who runs Qatar," a Saudi columnist, Said al-Suraihi, writing on the al-Arabiya news site, said Qatar had "disengaged itself from the consensus on issues that represent a common danger to the entire region."
Trump's visit — which included what was widely seen as a pledge not to lecture the region on human rights abuses — also raised fears about stepped-up domestic repression in Saudi Arabia and the countries in its orbit, including Bahrain, the United Arab Emirates and Egypt. Violence last week in Bahrain highlighted those concerns. The tiny island nation — a Saudi ally and a close partner of the United States — has faced criticism for the government's repression of dissent and accusations of systemic discrimination against Bahrain's Shiite majority.
Trump met with Bahrain's king in Riyadh last week, and promised their relationship would be free of the "strain" of previous years — a reference to the Obama administration's periodic scolding of Bahrain for rights abuses.
On Tuesday, two days after the meeting, forces in Bahrain raided an opposition sit-in outside the house of Bahrain's most revered Shiite cleric, killing five people in the deadliest confrontation with its opponents since a pro-democracy uprising on the island in 2011.
On the same day, in Egypt, the government of President Abdel-Fatah al-Sissi arrested one of the country's most prominent opposition lawyers and a likely challenger to Sissi in elections that will be held next year.
Sissi — who had appeared in a widely circulated picture alongside Trump and the Saudi king during the meeting in Riyadh, palming a glowing orb in a newly minted counterterrorism center — has received political support as well as billions of dollars in aid from the Saudis over the last few years.
Khalid Ali, the lawyer who was arrested, had played a prominent role in the legal effort to block a plan by the government to transfer sovereignty of two islands in the Red Sea from Egypt to Saudi Arabia.
It was not clear whether the arrest was related to the Saudi conference. Dozens of people have been detained in Egypt in recent weeks, including leftist and liberal government opponents as well as workers and trade unionists, according to Gamal Eid, an Egyptian human rights advocate.
The authorities also blocked at least 21 news websites this week, including Qatar-based outlets as well as Mada Masr, a news portal that it is widely seen as Egypt's last remaining independent publication.
The crackdown was not new, Eid said, but after the meeting in Riyadh — and Trump's "green light"— the campaign of arrests and censorship was "growing fast," he said.
Heba Farouk Mahfouz in Cairo contributed to this report.