Oman gets to show the West a relatively liberal and modern face of the Gulf and one that is in step with the policies of the United States administration, the official said. Israel, for its part, hopes the visit will ultimately lead to the return of some kind of diplomatic representation in Oman. Israel maintained another trade office in Qatar until that, too, was shut down in 2009.

For years, the Israeli Foreign Ministry has run a Twitter account that it calls @IsraelintheGCC, referring to the Gulf Cooperation Council, a political and economic alliance of six countries in the Arabian Peninsula including Bahrain, Kuwait, Oman, Qatar, Saudi Arabia and the United Arab Emirates, none that have formal diplomatic relations with Israel. The ministry describes the account as the “official channel of the virtual Israeli Embassy to GCC countries, dedicated to promoting dialogue with the people of the GCC region.”

In an interview last year with a London-based newspaper owned by a Saudi businessman, Israel’s military chief of staff, Lt. Gen. Gadi Eisenkot, said Israel was willing to share intelligence with moderate Arab states as part of the effort against Iran.

Mr. Netanyahu’s visit came days after the Palestinian president, Mahmoud Abbas, was in Oman. Sultan Qaboos has expressed interest in mediating between the Palestinians and Israel. But Ehud Yaari, an Israel-based fellow of the Washington Institute for Near East Policy, said Israel was more interested in Oman as a conduit to Tehran.

Despite the talk of an Israeli-Palestinian peace plan, tensions keep rising between Israel and Gaza, which is controlled by Hamas, the Islamic militant group that rivals Mr. Abbas.

On Friday, four Palestinians were killed by Israeli gunfire during stormy weekly protests along the Gaza border and a Gaza militant was killed when a bomb he was making exploded in his home. Israeli aircraft struck three Hamas military posts and Gaza militants fired a barrage of more than a dozen short-range rockets into southern Israel. Several were intercepted while others missed their mark. After midnight, Israel responded with more airstrikes.

The public nature of the visit to Oman is something of a coup for Mr. Netanyahu, a conservative who has long touted Israel’s hush-hush ties with former Arab foes as part of the Sunni axis against Shiite Iran.