For the past 25 years, energy analysts, investors, planners, and policymakers have been fixated on China. That made sense, as China’s decisions about energy production, consumption, imports, exports, and emissions have driven the global balance. But for the next quarter century, it is India’s energy decisions that will most likely be most impactful for the world economy.

China’s rise was one of the most consequential development stories in modern history. Its entry into the WTO on December 11, 2001, allowed it to grow its manufacturing more rapidly than any country before, earning an informal moniker as the world’s factory. This industrial surge lifted hundreds of millions of Chinese out of poverty. It was also a key driver of the global energy system as China consumed fossil fuels, especially coal, at a staggering rate. Chinese coal consumption tripled since 2000, and total energy demand grew at about 8% or more annually from 2000 to 2012, both of which are remarkable. The growth in China’s fossil fuel consumption since the turn of the century has few historical precedents. The closest example is the rapid industrialisation in the U.S. in the late 19th and early 20th centuries, driven by a transition from coal to oil and infrastructure expansion enabled by rail, steel, and manufacturing. But that U.S. growth unfolded over 50-70 years, whereas the Chinese story unfolded over 20-30 years.

Because fossil fuels were such a dominant part of China’s rising demand, it also overtook the U.S. as the world’s biggest greenhouse gas emitter. China also did more than any other country to make clean energy affordable. Its sheer scale of investment across sectors has had global impacts by driving down costs for buyers worldwide for technologies that are at the frontier of the energy sector today: solar panels, wind turbines, electric vehicles, and batteries. That is a complicated legacy, and it deserves to be understood as such.

But China’s 25-year sprint as the defining force of global energy markets is slowing down. With its population peaking, it will grow old before it grows rich, a demographic trap that has no easy exit. Its coal consumption, carbon emissions, and gasoline have either peaked or are close to it. And whatever one thinks of its economic model, China is not a free country, which might limit its capacity to lead in the way the next phase of global development will require.