Faced with a population boom that has sent carbon emissions soaring and stretched power supplies to breaking point, oil-rich Nigeria is turning to renewable energy in a big way.
Africa's most populous country needs more than 10 times its current electricity output to guarantee supply for its 198 million people - nearly half of whom have no access at all, according to power minister Babatunde Fashola.
Campaigners welcome the shift to renewables as an efficient way to bring power to rural communities and help clean up a country with some of the world's worst urban pollution rates.
"Ready access to electricity will reduce youth unemployment and increase productivity," Ifeoma Malo, Nigeria country director at the global campaign group Power For All, told the Thomson Reuters Foundation.
"It will contribute greatly to reducing the carbon footprint of a growing energy demand by the urban population."
Nigeria has set a target of expanding electricity access to 75 percent of the population by 2020 and 90 percent by 2030.
It aims to generate 30 percent of its total energy from renewable sources by 2030, Fashola said in a recent speech in London, a major commitment for an economy that depends heavily on fossil fuels.
Oil and gas production account for around 35 percent of Nigeria's gross domestic product and about 90 percent of total exports revenue, according to the Organization of the Petroleum Exporting Countries (OPEC).
Over the past year, the country has invested more than $20 billion in solar power projects, seeking to boost the capacity of the national grid and reduce reliance on it by building mini-grids in rural areas without mains electricity.
Just one in four people in rural Nigeria is connected to the national grid, adding to a trend of outward migration that is piling pressure on Nigeria's already overburdened cities.
Power demand in Nigeria's largest city Lagos vastly outstrips supply, meaning its 25 million residents must either go without, or rely on expensive, fume-belching generators.
In January the country suffered six power outages in just eight days as the national grid repeatedly collapsed under the strain, plunging most of the country into darkness.
Urbanisation and rapid population growth will only add to the problem - Nigeria's population is projected to swell from 198 to 411 million by 2050, and more and more people are moving to its cities.
By the start of 2020, demand for energy is forecast to be more than double its early 2018 levels.
Nigeria currently has the capacity to produce an estimated 7,000 megawatts (MW) of power, but due to weak infrastructure, gas supply problems and water shortages only about 4,000 MW reaches the national grid, according to Fashola.
The government is investing in hydropower, with several projects close to completion.
The largest is the Mambilla Power Station in central Nigeria, a $5.79 billion project due to be completed in 2024 with most of the financing coming from Chinese lenders.
It will be able to generate 3,050 MW of renewable energy in the rural region, and is scheduled to be completed in 2024.
Given the country's climate though, most of the focus is on generating solar power.
A $350 million World Bank loan will be used to build 10,000 solar-powered mini-grids by 2023 in rural areas, bringing power to hospitals, schools and households, said Damilola Ogunbiyi, managing director of the Rural Electrification Agency.
One of these projects, Sabon Gari, aims to generate between 1-4 MW of solar energy for 12,000 small and medium-sized enterprises (SMEs) in Nigeria's second largest city, Kano, by the end of the year.
The chief executive of the energy company behind the project, Rensource, said companies' energy costs had fallen at least 30 percent since they started using the solar grids.
"Up until now, the entire market has been powered by a network of small-scale, dirty, unhealthy generators that are also quite expensive," Ademola Adesina told the Thomson Reuters Foundation in a telephone interview.
"We are replacing those generators with a network of solar hybrid systems that are powering the entire market."
Rensource hopes to expand to rural areas, where the World Bank estimates 80 million Nigerians live without electricity.
Power For All's Malo said small-scale projects such as these offered the best chance of bringing power to remote areas.
"The Rural Electrification Agency realises that the traditional, public-sector-led grid extension system will not meet the demands of the growing population," she said.