In the old fossil fuel heartlands of Australia, a new kind of industry is being built.
At Kwinana south of Perth, not far from the chimneys and silos of a decommissioned oil refinery, land has been secured to produce highly refined battery minerals.
In Geelong, where Ford built cars for almost a century, work is underway on a lithium-ion battery "gigafactory".
In the Hunter Valley, where coal is king, another gigafactory has just opened.
And earlier this month, it emerged that lithium, a central ingredient for batteries, will soon be worth more to WA than oil, gas and coal combined.
The humble rechargeable battery has become a big deal.
A technology developed to power mobile phones has become critical for everything from clean transport to renewable grids.
Global demand for batteries is forecast to increase tenfold over the next decade, and fortyfold by 2050.
Now, one question is being asked, and its answer could shape Australia's prosperity for generations.
Who makes the batteries?
'Selling wool and buying back jumpers'
Batteries are made in lots of places, from lots of materials.
"A modern rechargeable battery is a highly advanced piece of technology," says Shannon O'Rourke, CEO of the Future Battery Industries Cooperative Research Centre (FBI CRC), based at Curtin University in Western Australia.
"Though it looks simple from the outside, on the inside it contains precisely engineered materials made from the purest refined products."
The chart below shows the sequence of processes that turn raw minerals into a lithium-ion battery, and the share of total revenue each step of this value chain is estimated to represent by 2030.
The step of cell manufacturing captures almost half the total revenue, but Australia currently doesn't manufacture lithium-ion cells at scale.
Instead, its contribution is almost entirely through mining, which accounts for three cents in every dollar of total value.
This financial year, Australia will export about $18.5 billion worth of lithium, or around half the global supply.
Most of that lithium will be shipped to China, which is home to six of the world's 10 biggest battery manufacturers and dominates the global battery value chain.
It's a similar story with other battery minerals, such as graphite, nickel, manganese, cobalt, vanadium, copper and aluminium.
Australia is essentially "selling the wool and buying back jumpers", says Brian Craighead, CEO of Renaissance Energy, an Australian battery maker.
"That's basically what we do, we dig it up and send it out."
"We get 5 cents in the dollar and we live with that … but we can get 95 cents."
For Australia to win a greater share of revenue, it will have to take on its trade partners at their own game of large-scale minerals processing and advanced manufacturing.
The federal government is preparing a national strategy to do just that, and has promised concessional loans for the sector.
Last week, it announced a "growth centre" to help businesses seeking to locally manufacture clean energy technologies.
But within this emerging industry, there's concern that Australia is moving too slowly.
"Everyone in this process including us is saying we need to make this go faster," says Steve McCartney, WA state secretary of the Australian Manufacturing Workers' Union (AMWU WA).
Adam Best, a principal research scientist at the CSIRO, says the rest of the world is moving faster than Australia.
"The opportunity is a short window, in my view.
"Once these [battery-making] facilities are established [overseas], you won't move them."
Despite its natural advantages of resources and cheap energy, Australia could get stuck selling the wool and buying back jumpers.
"Everyone wants to be a clean energy superpower," Mr O'Rourke says.
"It's a competition, not a tagline."
How to make a battery
Think of a lithium-ion battery as a tall, column-shaped wedding cake, the kind with layers of sponge and cream, except it's been laid flat on its side.
"There are a lot of similarities to food manufacturing," says Rob Fitzpatrick, CEO of Recharge Industries, which is building what will be Australia's first large-scale factory to make lithium-ion cells.
"You need to pump out tens of thousands of battery cells a day."
A typical battery has four main components: An anode that holds the lithium ions when charged, a cathode that holds them when discharged, a separator that is placed in the middle, and an electrolyte medium that enables movement of lithium ions between the cathode and anode.
Like with making a cake, you start with the raw ingredients.
For the purpose of this example, let's go with the type of battery found in most electric vehicles, e-bikes and power tools today.
Known as an NMC, it has a cathode primarily made of nickel, manganese and cobalt.
And just like with baking, making this cathode begins with a slurry.
The component minerals are mined, crushed, separated and concentrated to create battery-grade, 99.99 per cent pure, nickel sulphate, manganese sulphate and cobalt sulphate.
Lithium ore is converted to lithium hydroxide and mixed with each of these precursor materials.
These are then blended into a uniform mixture, along with a solvent, and coated on a current collector of aluminium foil thinner than a human hair.
These coated foils are pressed and baked. The separator is layered between the anode (usually graphite) and the cathode, and then these are wound into a spiral before being pushed into a cylindrical cell casing.
The electrolyte is injected into the cell, which is then charged and discharged, in a process of testing and grading cell capacity.
Finally, these cells are combined into stacks, which in turn are assembled into racks, and connected to the electronic system that monitors their charge and health and controls the power output.
Sounds simple, right?
Now consider that completing just one part of one of these steps requires its own multi-million-dollar facility.
At Kwinana, crushed lithium ore is converted to lithium hydroxide by being dissolved in concentrated sulphuric acid at high temperature.
Powerful magnets are used to extract iron, to ensure the final product is free of iron to parts-per-billion levels.
This Kwinana plant, which refines a small fraction of all the lithium mined in WA, cost $1 billion to build.
Recharge Industries' proposed Geelong "gigafactory", which will make lithium-ion cells and assemble them into batteries, requires a $4.8 billion investment over seven years, CEO Rob Fitzpatrick says.
"The scale and size of it is breathtaking," Mr Fitzpatrick says.
"For 6GWh of annual production, it's eight jumbo jets end-to-end long, and two jumbo jets wide."
This annual production figure is a fraction of Australia's projected storage requirements by 2030.
"Global demand at that time is projected to be anywhere from 3,500 gigawatt-hours to 8,800 gigawatt-hours."
A commercial problem, not a technical one
Manufacturing batteries is technically challenging, but this isn't what's slowing the industry's growth, experts say.
The main hurdle is access to capital.
Manufacturers have a chicken-and-egg type problem, where to make battery cells, they need access to battery minerals.
But the battery minerals Australia makes have already been bought by battery manufacturers overseas, in multi-year offtake agreements.
To get capital to expand battery minerals production, a producer needs to show the bank there will be demand for this product. It does this by selling what it says it will produce in the future.
Start-up Australian battery manufacturers can't secure these offtake agreements, as they haven't made any batteries.
"You need between three and five years of your [battery minerals products] offtake to be sold … for an Australian banking facility to back [this expansion]," says Brian Craighead from Renaissance Energy.
"They all largely have the same problem, which isn't a technical problem. It is a commercial problem."
Renaissance had planned to make lithium-ion cells in Australia, but couldn't secure a source of battery materials. Instead, it assembles batteries from imported lithium-ion cells, with plans to one day make its own.
Recharge, meanwhile, plans to buy most of its battery minerals from overseas, until it can source them locally.
CEO Rob Fitzpatrick says the industry is stuck in a loop of chasing capital, but not being able to prove its product or show it has customers.
"It's an absolutely eye-watering set of numbers to be able to create this [manufacturing] capability," he says.
"[And the bank] is going to ask, 'Who are your customers?' Customers are going to go, 'Show me a product'. But you can't make products until you've got capital."
He says one solution to this would be for the government to step in and provide start-up funding ahead of private investors.
This may be a focus of the federal government's national battery strategy, expected later this year.
The AMWU WA, meanwhile, backs the idea of the government building the infrastructure needed to, for instance, make battery chemicals, or manufacture cells, and then leasing this to companies.
These government-owned "common-use facilities" would encourage small-to-medium enterprises to test ideas and develop their products, without having to raise lots of capital first, says the AMWU WA's Steve McCartney.
"With this leased infrastructure, [they] will go in there and show what they can do.
"This is how we minimise risk."
Competing with China
Two weeks ago, the WA government announced plans to fund what will be Australia's biggest battery (2,000 megawatt-hours), in the coal centre of Collie.
Along with a second, smaller battery in Kwinana, it will cost the state $2.8 billion.
Neither will be substantially built in Australia.
"I'm disappointed the two biggest batteries in WA will not be made in WA," Mr McCartney says.
"We need to make sure we have a thriving industry by the time all these batteries need to be replaced."
In 10 years' time, Australia could have a full end-to-end value chain for lithium-ion batteries, operating at scale, says the FBI CRC.
In a report published in March, the CRC forecast two scenarios for 2030. In one, Australia is mostly digging up and exporting unprocessed battery minerals, as it currently does.
In the other, it's diversified into refining, cell manufacturing and battery assembly, while continuing to do mining.
The industry in this second scenario would be worth $16.9 billion, or about a third more than the first, the CRC predicts.
It would also generate about twice as much GDP and twice as many jobs, it says.
Because materials and energy account for most of the cost of a battery, rather than labour, Australia could make some of the cheapest batteries in the world, says Shannon O'Rourke from the FBI CRC.
"Australia is the only nation in the world with large resources of all the required critical minerals," he says.
"We are the only location with the minerals, cheap energy and industrial infrastructure to vertically integrate our domestic production and compete with China."
Recharge's Rob Fitzpatrick also says Australia can make cheaper batteries than other countries.
"We believe that based on the bill of materials, going back to the chemistry and components, that we have a cost advantage," he says.
Most of the batteries Australia could make would provide storage for energy grids, rather than electric vehicles, says Adam Best from the CSIRO.
Australia doesn't make cars on a big scale and car-makers like to locate their car-making plants next to the battery-making ones.
"There's a big export market for stationary storage for south-east Asia and the Pacific," he says.
And like the CRC, he sees most of the revenue coming from a "sweet spot" in the value chain, around mining, refining and battery chemical manufacturing.
But apart from money, having some sovereign battery manufacturing would be a good thing, he adds.
Soon, most of Australia's two main power grids will be powered by renewables, meaning they'll be reliant on batteries and other storage.
"If things go pear-shaped, we'll have to know how to make batteries," Mr Best says.
For the first time in decades, state and federal governments are talking about manufacturing being a solution to growth, jobs and energy security, rather than a dying industry that has to be saved.
"Considering the way we got cleaned out in the 1990s, and everything went offshore, it's music to my ears," Mr McCartney says.
"I think everyone is excited about the opportunities."