HOW far renewable energy can develop without further subsidy is one of the world’s hottest questions. It will surely need to become a lot more economic if the world is to stop using fossil fuels by 2100, as rich-world leaders promised at the G7 summit in Germany this week.

Transforming the promising niche business of renewable energy into the engine of the world’s economy is a daunting task. Hydroelectric generation can produce lots of power at low cost, but room for growth is constrained by environmental objections and a lack of dammable valleys in the right places. Tidal power is too untried, and so far looks too costly. Biomass (such as wood), like biofuels, will require a great deal of land to produce much energy.

Some see these drawbacks as a reason to plump for nuclear power, though its cost overruns make it unattractive. Others focus, therefore, on the two forms of renewable energy generation that have done best in recent years, solar and wind power. Growth rates are impressive—solar-energy generation grew by 38.2% last year, reckon statisticians at BP, an oil firm whose annual energy review came out this week. But the growth is from a very small base. Solar, wind and the like met 0.9% of global energy use a decade ago; that has risen to 3% now and will reach 8% by 2035, BP thinks.

To make that picture brighter, costs will have to plummet. Wind offers less scope for this (bigger windmills are more efficient, but costly to make and build). Solar is what most cheers the optimists. It can work at any scale from a modest panel placed on the roof of a house to a giant array. The plunge in costs in previous years (see chart) seems broadly to be continuing. Steve O’Neill of REC, a maker of solar systems, says his costs are falling by 1% a month, thanks to cheaper ways of making silicon wafers and to economies of scale. The circuitry that goes with solar panels, and the cost of installation, are also getting cheaper. Consultants at McKinsey say the cost of installing a watt of solar generating capacity could halve over the next five years. Solar is no longer just a creature of subsidies (such as the 30% investment-tax credit it gets in America, along with the right to feed spare power back into the grid at the retail price). In the sunniest parts of the world it competes well with natural gas, even where that fuel is very cheap. But the cost of solar power is not just about the systems that households and businesses install. On cloudy days and at night, they need power from elsewhere: either from storage of some sort, or from the grid. But who is to pay for it? Backup generation, and the grid infrastructure across which it flows, become increasingly uneconomic as consumers generate more of their own power (and thus pay less to other providers). A recent report from the Massachusetts Institute of Technology notes that solar power’s success therefore risks being self-limiting. Better and cheaper batteries are one answer: surplus solar power generated while the sun shines can be drawn down when it is dark. But there is some way to go on this. Even the largest of the new generation of battery kits, the much-trumpeted Tesla Powerwall, costs $7,140 to install and stores only ten kilowatt-hours—not nearly enough to heat or cool a typical home.

Another option is thermal storage: using surplus power to heat or freeze water, which can then be used to warm or cool a building when needed. This is cost-effective, but only a partial solution. The stored energy cannot be easily transported, and heating and cooling are only part of consumers’ power needs.

The real solution to intermittent power generation (whether solar or wind) is bigger and more flexible grids, with interconnections that cross corporate and international boundaries. The bigger the geographical area a power network covers, the greater the chance that sun or wind electricity generated in one place can be matched with demand elsewhere (though there would still need to be substantial spare capacity). But incumbent power companies may balk at investments that erode their pricing power.

There are parallels between the disruption that solar power threatens to cause in the electricity industry and the upheaval that America’s shale drillers have already brought about in the fossil-fuel business. A study by Wood Mackenzie, a consulting firm, says solar’s impact could indeed be “comparable” to that of shale gas.

But this very abundance of gas in North America—and perhaps elsewhere one day, if fracking gets cracking—means that except in the sunniest climes, solar power will face stiff competition from gas-fired power stations. Wood Mackenzie reckons that the unsubsidised capital cost of small-scale residential solar capacity will still be twice as costly as modern gas-powered generation by 2030. Larger, utility-scale solar arrays will be competitive by 2025, however.

Solar power has so far confounded its doubters. And whereas the cost of oil and gas can go up as well as down, solar’s cost will only keep falling. But for it to keep increasing its share of electricity generation without causing a collapse in power markets, let alone for it to banish fossil fuels altogether, there will need to be significant progress in energy storage, and in building grids better suited to a world of intermittent sources of power.