Such supreme ease of use was Uber’s founding stroke of genius. Everything unpleasant about using a cab — finding one, getting one to stop for you, figuring out a way to pay if you didn’t have cash, and fretting about whether you were being ripped off — had been improved by software.

In India, too, Uber saw a transportation sector ripe for remaking. As India’s economy grew over the last 40 years, hundreds of millions of people have moved to urban areas from villages. India now has three cities — Mumbai, Delhi and Kolkata — with more than 15 million residents, and it has dozens more with more than a million.

Yet India’s urban infrastructure has not kept up. By the turn of the last century, transportation scholars began warning of an urban transportation crisis that had driven air and noise pollution, traffic, and road fatalities to some of the highest levels in the world.

It is especially difficult for India’s poor to get around. A tiny slice of the wealthiest Indians can afford private cars and drivers to ferry them. Others make do with an array of lesser choices: bicycles, scooters, bicycle rickshaws, motorized rickshaws, buses so crowded that passengers hang out the door. Most Indian cities lack adequate public transportation, and because of the foul air and the dearth of sidewalks, walking itself can be perilous. In Bangalore, three pedestrians are killed on the roads every two days.

For both Uber and Ola, this presented an opportunity. Both thought technology would enable them to provide rides that were cheaper than other forms of transportation and more accessible to a wider swath of Indians.

“Before we existed, getting a cab in most Indian cities was expensive and difficult,” said Pranay Jivrajka, a founding partner of Ola. “You’d have to call one day in advance. We started booking cabs with 12 hours notice, then four hours, and then we started on-demand. And today, if an E.T.A. is more than five minutes, people start complaining.”