An Australian state will install the world's largest lithium ion battery in a "historic" deal with electric car firm Tesla and energy company Neoen.
The battery will protect South Australia from the kind of energy crisis which famously blacked out the state, Premier Jay Weatherill said.
Tesla boss Elon Musk confirmed a much-publicised promise to build it within 100 days, or do it for free.
The 100MW (megawatt) / 129MWh (megawatt hour) battery should be ready in 2017.
"There is certainly some risk, because this will be largest battery installation in the world by a significant margin," Mr Musk said in Adelaide on Friday.
He added that "the next biggest battery in the world is 30 megawatts".
The Tesla-built battery, paired with a Neoen wind farm, will operate around the clock and be capable of providing additional power during emergencies, the government said.
"It will completely transform the way in which renewable energy is stored, and also stabilise the South Australian network as well as putting downward pressure on prices," Mr Weatherill said.
Mr Musk's 100-day pledge will begin once an electricity grid interconnection agreement has been signed.
Tesla has been expanding its battery business alongside its car production.
South Australia has suffered from blackouts since September last year, leading to a political spat over energy policy.
The row culminated in a bizarre confrontation between Mr Weatherill and a federal government minister at a press conference in March.