CAIRO — In the tumultuous two years since President Abdel Fattah el-Sisi of Egypt came to power, one ally has kept the Arab world’s most populous country from economic ruin: Saudi Arabia pumped more than $25 billion into the faltering Egyptian economy, dwarfing aid from the United States.

The Saudis may have thought they were buying loyalty. But Egypt’s vote last month for a Russian United Nations resolution on Syria threatens to unravel Mr. Sisi’s relationship with Egypt’s most crucial benefactor.

Shortly after the vote, the Saudi ambassador to Egypt left Cairo for an unscheduled three-day visit to Riyadh. The state-owned Saudi oil company, Aramco, postponed a promised shipment of 700,000 tons of discounted oil in October, and the spokesman for Egypt’s oil ministry said the fate of November’s shipment remains unknown.

Then last week, the Saudi head of a major Islamic organization, who has since resigned, publicly mocked Mr. Sisi, exposing the rift in a new way.