Tesla gave the world two glimpses of the future last week. First, the company confirmed its long-awaited Model 3 would hit the market this summer. Once it reaches the forecourts it will be the first genuinely affordable, fully electric vehicle (EV) on offer to consumers. The Model 3 is projected to be the stalking horse for an EV market that will boom over the next decade. That in itself will have a profound effect on carbon emissions and energy use. Yet this was only one half of the renewables story last week. The real news of interest came out of South Australia.

On Friday the state government announced that Tesla had won a bid to install the world’s largest grid-scale battery, which will store power generated by a major new wind farm. The battery itself is essentially no different from the one in a smartphone that allows extended usage without powering up – now think of that same battery on an industrial scale. When it comes online in December the facility will store around 129 megawatt-hours of energy, enough to power 30,000 homes.

The announcement was a PR coup for South Australia and couldn’t have come soon enough. The state has emerged as a global leader in renewable energy with its capital, Adelaide, in the running to become the first city on Earth to reach carbon-neutral status. Yet this has come at a cost. Last year South Australia was hit with a massive power outage, with almost the entire state losing power. Dystopian pictures of a major global city in complete darkness put Adelaide on the map for all the wrong reasons and also acted as powerful ammunition for renewable energy critics – not least in the federal government – to claim that South Australia’s pivot from fossil fuels to renewables was putting the state’s citizens at risk.

The Tesla deal aims to address this weakness. The great problem for renewable energy has been storage. How can energy generated from unpredictable sources such as solar and wind be stored so that it can then be dispersed during spikes in demand? Until recently battery technology simply didn’t deliver the capacity needed. That was until a series of breakthroughs in the lithium-ion battery. It now has the ability to store and disperse energy over extremely long periods of time – a feature that has already fuelled a revolution in consumer technology, enabling tablet and smartphone usage and now, finally, allowing the roll-out of electric vehicles that have a range similar to their petrol-powered equivalents.

The technology is now being ramped up to power cities, and Adelaide will be the test bed for this next renewables revolution. Speaking to Reuters about the announcement, Ian Lowe, a professor of science at Australia’s Griffith University said: “Cost-effective storage of electrical energy is the only problem holding us back from getting all of our power from wind and solar … this project is a significant innovation to demonstrate the feasibility of large-scale storage.” And the world is looking on.

The scale of the project (the battery facility will dwarf the world’s current largest battery storage facility in California) plus the prodigious ability of Elon Musk to get people talking about his company’s projects mean that its success or failure will go a long way to deciding how our cities power themselves in coming decades. Musk himself has upped the stakes further by confirming a claim made earlier this year that if Tesla can’t get the plant up and running within six months it will complete the project for free, exposing the company to a potential “$50m” loss. But a growing number of countries think the lithium-ion gamble will pay off. The UK government has already announced new subsidies for grid-scale battery storage facilities and several other countries are doing the same.

But this progress is not without risk. Lithium-ion battery technology is not perfect and demand for the raw materials that make up the batteries will likely create supply challenges and price spikes. And the construction of the lithium-ion battery itself comes with serious environmental and social challenges. Most lithium-ion batteries consist of a varying mix of lithium, graphite, manganese, cobalt and nickel – all of which have problems in production.

Graphite and nickel have considerable environmental issues, whereas cobalt – the pivotal ingredient in enabling long-life batteries – is sourced predominantly from the Democratic Republic of the Congo and has serious social challenges associated with it, including child labour. Analysts accept there is a long way to go in improving these supply-chain issues but progress is coming. Responsible sourcing groups such as RCS Global are working with major battery makers and electronics companies to map battery supply chains and ensure the materials that make up the products are ethical and sustainable. Apple has also played a critical role here: its responsible sourcing practices for its phones, tablets and other products have been widely seen as the new standard bearer that all electronics producers are now looking to follow.

The genius of Musk and Tesla is their ability to make everything from electric cars to sustainable cities and space travel seem not only conceptually possible in the future but tangible and possible right now. Equally the South Australian government’s willingness to double-down on renewables and prove that genuinely carbon-neutral economies can be delivered has pushed other, larger regional and national governments to explore similar projects. The partnership between the US tech giant and the relatively small but increasingly innovative Australian state could just work and provide the evidence that renewables on a macro scale are viable. No doubt all but one of the leaders at last week’s G20 summit would be receptive to that argument.