UNITED NATIONS — Solar panels are everywhere: perched on thatched roofs in rural Kenya, helping Indian farmers pump groundwater for their fields, and powering United States military bases.

Solar power accounted for more than a third of all net new power capacity added worldwide in 2017, a larger share than any other new source, the United Nations Environment Program said in a report issued Thursday. And solar power is becoming much more affordable. The cost of electricity from large-scale solar projects has dropped by 72 percent since 2009, according to the study.

But even as solar and its renewable energy cousins — like wind, biomass and geothermal power; but not counting big hydropower projects — expand, they still account for barely 12 percent of all the electricity that the world consumes. The greatest share still comes from fossil fuels like coal, and more coal-fired power plants continue to be built, contributing to the greenhouse gas emissions that have warmed the planet to dangerous levels.

“This shows where we are heading,” said Nils Stieglitz, a professor at the Frankfurt School of Finance & Management, which produced the report along with Bloomberg New Energy Finance. “The fact that renewables altogether are still far from providing the majority of electricity means that we still have a long way to go.”