After fueling the 20th century automobile culture that reshaped cities and defined modern life, gasoline has had its day.

The International Energy Agency forecasts that global gasoline consumption has all but peaked as more efficient cars and the advent of electric vehicles from new players such as Tesla Motors Inc. halt demand growth in the next 25 years. That shift will have profound consequences for the oil-refining industry because gasoline accounts for one in four barrels consumed worldwide.

“Electric cars are happening,” IEA Executive Director Fatih Birol said in an interview in London, adding that their number will rise from little more than 1 million last year to more than 150 million by 2040.