China’s electric taxi and rideshare boom is giving the world’s largest crude importer a new defense against oil shocks, as higher gasoline prices push more urban travelers out of private petrol cars and into cheaper app-based rides.

Rideshare Trips Rise As Fares Fall Chinese passengers took 3.05 billion taxi and rideshare trips in May, Reuters reported on Wednesday, citing government data.

Trips rose 6% from March through May compared with the same period last year, even as oil-market stress from the war in Iran lifted fuel prices.

The shift reflects two forces working together.

More drivers are entering ride-hailing as China’s economy slows, while cheaper electric cars reduce operating costs and push fares lower.