RIYADH, Saudi Arabi — As Saudi Arabia considers digging a moat along its border with Qatar and dumping nuclear waste nearby, Secretary of State Mike Pompeo arrived in Riyadh on his first overseas trip as the nation’s top diplomat with a simple message: Enough is enough.

Patience with what is viewed in Washington as a petulant spat within the Gulf Cooperation Council has worn thin, and Mr. Pompeo told the Saudi Foreign Minister, Adel al-Jubeir, that the dispute needs to end, according to a senior State Department official who briefed reporters on the meetings but who was not authorized to be named.

Last June, Saudi Arabia and the United Arab Emirates led an embargo by four Arab nations of Qatar, accusing the tiny, gas-rich nation of funding terrorism, cozying up to Iran and welcoming dissidents. Years of perceived slights on both sides of the conflict added to the bitterness.

Mr. Pompeo’s predecessor, Rex W. Tillerson, spent much of his tenure trying to mediate the dispute, which also involved Egypt and Bahrain, but without success. The Saudis, keen observers of Washington’s power dynamics, knew that Mr. Tillerson had a strained relationship with President Trump and so ignored him, particularly because Mr. Trump sided with the Saudis in the early days of the dispute.