CAIRO — As Uber sought this year to expand in Egypt, one of the most competitive ride-sharing markets, its executives faced a troubling request from Egyptian ministers: Could they provide access to heaven?

“Heaven” is Uber’s term for an internal software that provides live data about customers, drivers and journeys — in effect, it tracks any Uber ride across a giant digital map.

That software would be a powerful tool in the hands of Egypt’s security services, which, under President Abdel Fattah el-Sisi, have ramped up spying on citizens as part of an effort to stifle dissent and entrench Mr. Sisi in power.

Already reeling from accusations of overly aggressive business practices in the United States, Uber rejected the Egyptian demand. But its chief competitor in the Middle East — the Dubai-based Careem, which operates in 55 cities, has similar tracking software and serves three million Egyptians — took a closer look, according to three ride-sharing executives.