China is hungry for energy. But India is even hungrier.

India will need more additional energy to fuel its economy between now and 2040 than any other country, according to OPEC. It's the first time that India has topped China as the primary driver of energy demand.

While India has captured the top spot, the cartel said the shift if more about changes in China.

"This change in the leading position is primarily the result of the downward revisions made for China... rather than a more positive outlook for India," OPEC said in its World Oil Outlook 2040.

Related: The young entrepreneur bringing cleaner air to India's villages

China is forecast to need less energy than previously thought because its government is making big moves toward renewable sources.

The country -- a major polluter -- has embarked on a campaign to shut down several existing coal mines and restrict the construction of new ones.

China has also pledged to get 20% of its total energy from clean sources by 2030 -- which should improve efficiency.

"Recent signals and specific actions being undertaken by China... have raised the credibility of government endeavors to combat domestic pollution problems, contribute to efforts to reduce global emissions and use energy more efficiently," OPEC said.

Related: China is crushing the U.S. in renewable energy

India has also set ambitious renewable energy targets, but it is still largely dependent on dirty fuels like coal. OPEC says that its demand for coal will remain high.

China and India are among several countries aiming to ditch gas and diesel cars within the next two decades.

OPEC, however, said that will "only partially" reduce their demand for energy.