For most residents of rural sub-Saharan Africa, sunset means a world of darkness.

But recently those in areas without electricity are taking advantage of an alternative to traditional electric hookups that could help solve Africa’s power problem: off-grid solar home systems, which electrify houses with a battery-connected rooftop panel.

Though the technology is not new, it’s becoming more popular in the region following a steep decline in the cost of photovoltaic panels and the rising efficiency of LED lights and appliances. More than a dozen firms offering these systems on a pay-as-you-go basis are now operating in Africa.

Proponents say pay-as-you go home solar has important advantages over other options. These systems can be deployed immediately and don’t cloud rooms with fumes like kerosene lanterns do (such lanterns remain widely used by the two-thirds of sub-Saharan African households without electricity). They are also immune to the power outages that frequently befuddle those with a grid connection.

They are economical as well. In Kenya, the national utility charges customers 15,000 shillings ($150) for a new connection. Its own per-connection cost is 10 times higher. Customers pay monthly bills thereafter, while these off-grid systems deliver light without a monthly charge once the initial investment is paid off.

The largest off-grid solar operator in the region, M-Kopa, has sold more than 400,000 systems in Kenya, Tanzania, and Uganda since its launch in 2011—a figure its CEO Jesse Moore believes can reach four million in the next five years.

The M-Kopa shop in Eldoret, Kenya.

M-Kopa’s basic system, which includes an eight-watt solar panel, six-volt lithium-ion battery, two LED lightbulbs, mobile phone charging station, torch, and radio, costs $217 over the course of a year, just $60 more than what the average off-grid Kenyan household spends on kerosene, batteries, phone charging, and candles.

Today, the most active markets are in East Africa, where mobile money penetration is highest and payments by phone have helped drive rapid growth. Ian Muir, a World Bank consultant specializing in off-grid energy in the region, says uptake is likely to accelerate in a number of African markets as the mobile payments ecosystem expands and governments realize the systems can drive rural electrification quickly and at a comparatively low cost. Nascent markets of particular interest include Nigeria and Ethiopia, Africa’s two most populous countries.

In the Rift Valley region of Kenya, Tegla Keter has recently become an M-Kopa customer. In the six years since building her cozy two-room house, the 38-year-old high school secretary has been waiting for a connection to the national grid. But her home, set on a dirt path surrounded by maize fields, is too far from the nearest transformer, and the government has long neglected to build another in such a sparsely populated area.

In the interest of her children’s health, she long ago shelved her kerosene lantern. For a time, her kids, ages 12 and 9, used a solar lamp to study in the evening, but it provided minimal light and became increasingly dim.

On the advice of a neighbor, Keter took a minibus to Eldoret, the nearest town, where M-Kopa sells its solar home systems from a gas station parking lot. At the company’s shop, carved out of a shipping container, a salesman hooked her on the M-Kopa 400, the company’s larger, 20-watt package, which comes with a flat screen television. The upfront cost of 8,000 Kenya shillings ($80), would be followed by payments for a one-year period, made through mobile money, that average 125 shillings ($1.25) per day.

Despite years of strong economic growth, the number of Africans who find themselves in Keter’s situation continues to rise as population growth outpaces the rate of new connections. The 48 sub-Saharan countries, excluding South Africa, have a combined generating capacity of less than 40 gigawatts, a figure similar to that of Poland.

That seems like a big opportunity for the off-grid solar industry, which despite its growth has yet to reach the critical mass of households at which it will generate profits.

The industry faces competition, including charitable giveaways of similar products. In August, the Canadian firm Sky Power, a major investor in Kenya’s grid-connected solar sector, donated the first of what it says will be two million solar home systems to Kenyans “at the bottom of the energy ladder.”

The Kenyan government is also prioritizing grid expansion despite the cost, and aims to connect 70 percent of Kenyans by the end of 2017 with support from the World Bank, African Development Bank, and other donors. The project targets 472,000 off-grid households within range of existing transformers. More remote areas could be increasingly targeted by mini-grids like the solar-powered versions that the U.S. company Powerhive—the first private utility authorized to sell electricity in Kenya—has announced plans to begin building in 100 Kenyan villages in partnership with Italy’s Enel Green Power.

Schoolwork by the light of a solar-powered LED lightbulb.

Technological limitations are an issue as well. Although off-grid systems have become increasingly powerful over time, their output is still too limited for appliances like refrigerators, irons, and fans, which many rural Africans aspire to. M-Kopa’s Moore says new system-compatible appliances are in the company’s pipeline: fridges, he says, are the industry’s “next big thing,” to be followed by fans and possibly even air conditioners.

Despite the challenges, investors are enthusiastic about Africa’s off-grid players, with funding rolling in from both venture capitalists and funds drawn to the sector’s social and environmental impact, in addition to some grants and loans from charitable foundations and international development funds. Generation Investment Management, the London-based firm founded by former U.S. vice president Al Gore, for example, led a $19 million round of equity raised by M-Kopa last December. And on December 1, Lumos Global, an off-grid solar company active in Nigeria, announced that it had raised a record $90 million from the U.S. government's development finance arm and private investors.

To stand on its own, the industry must next convince local commercial banks to become more involved in loaning them money to build up their businesses, argues the World Bank’s Muir. To date, this group has approached the sector with caution, in part because the pay-as-you-go model entails borrowing by customers who typically have little collateral.

But for people like Keter, happy for her new lights, the investment is well worth it. Her system’s LED bulbs have solved her most pressing concern—her children’s ability to do their homework. Though it has brought a new challenge to her home, one well-known in the more wired world: managing the kids’ time in front of the television.

Jonathan W. Rosen is a journalist covering Africa. He is a 2016 Alicia Patterson Foundation reporting fellow.