CAIRO — Close allies and Arab powerhouses Egypt and Saudi Arabia are having their first public spat since Egyptian President Abdel-Fattah el-Sissi took office two years ago, a quarrel over Syria that points to a wider, but mostly muted, divergence in the handling by Cairo and Riyadh of regional issues.

The two countries have gone to great lengths to shield their differences from the public eye, often emphasizing their closes ties and cooperation. But Egypt’s vote in favor of separate Russian and French draft resolutions on Syria at the U.N. Security Council over the weekend has apparently angered the Saudis.

Egypt’s U.N. Ambassador Amr Aboulatta, the Arab representative on the council, defended his support for both drafts, saying his country backed all efforts to stop the suffering of the Syrians.

Russia vetoed the French resolution demanding an immediate halt of the bombing by Russia and the Syrian government of rebel-held areas in the northern city of Aleppo.

The Russian draft called for the separation of “moderate” rebel factions from Islamic extremists, but made no mention of a halt to the bombing. It was rejected because it failed to get the minimum nine “yes” votes needed for approval by the 15-member council.

Egypt and Saudi Arabia’s differences over Syria is rooted in Riyadh’s conviction that Syrian President Bashar Assad must be removed for that country’s civil war to end, while Cairo advocates a political process that denies Islamic militants any role in Syria’s future. Riyadh is also opposed to Russia’s military intervention in Syria in support of Assad. Under el-Sissi, Cairo, wishing to see Syria’s institutions and army emerge unscathed from the conflict, has not publicly spoken against the Assad government or the Russian intervention.

In a rare public rebuke to Egypt, Abdallah Al-Mouallimi, the Saudi U.N. ambassador, denounced Cairo’s support for the Russian draft. “It was painful to see that the Senegal and Malaysia positions were closer to the Arab consensus on Syria (when) compared to that of an Arab representative.”

Like Egypt, Malaysia and Senegal are non-permanent Security Council members.

A senior Washington-based Saudi lobbyist, Salman Al-Ansari, went farther than the ambassador, disparagingly playing on popular Arabic phrases extolling Egypt’s high standing in the region and beyond.

“Excuse me, Arab Republic of Egypt, but your vote in favor of the Russian draft in the Security Council made me doubt your motherhood of the Arabs and the world,” he wrote on Twitter.

Their comments made the front page of two Cairo dailies on Monday. “The first official Saudi criticism of Cairo,” declared the headline of the independent Al-Shorouq’s story on the quarrel.

“There is a crisis in relations, but it has long been suppressed,” said prominent Egyptian analyst Abdullah el-Sennawy. “But I don’t think either side wants to escalate this flare-up over the security Council vote. They realize they both need each other.”

Saudi Arabia strongly supported the Egyptian military’s ouster in 2013 of the Islamist Mohammed Morsi, Egypt’s first freely elected but divisive president. It has poured billions of dollars into Egypt to keep its flailing economy afloat. Beside Syria, relations have been jolted by several bumps since King Abdullah died and was replaced in January 2015 by his half-brother Salman.

Riyadh also seemingly expected that Egypt, which routinely talks about its unwavering commitment to the security of its Gulf Arab allies, would commit ground troops as part of a Saudi-led military coalition that intervened last year in Yemen’s civil war against Iranian-backed Shiite rebels. But Egypt’s commitment has so far been mostly restricted to a limited naval deployment near the southern Red Sea entrance and military advisers in Saudi Arabia.

Egypt has also resisted being drawn to the sectarian rhetoric that defines the rivalry between Sunni Saudi Arabia and Shiite Iran. Moreover, Cairo also maintains channels of communication with Tehran, notwithstanding its occasional and thinly veiled criticism of Iran’s growing influence in the region.

It also enjoys close relations with Iraq’s Shiite-led government, another Saudi adversary.

Popular opposition in Egypt to a decision by el-Sissi in April to relinquish control of two key Red Sea islands to Saudi Arabia has injected a sour note into relations. The move prompted the largest anti-government protests since el-Sissi took office in 2014 and the constitutionality of his decision on the islands is being contested in a high-profile court case.