Billionaire Tesla CEO Elon Musk will build the world's largest lithium ion battery in South Australia in a plan to help solve the state's energy woes.

The battery will be built in Jamestown, South Australia, under an agreement between Tesla, French energy company Neoen and the South Australian government, state premier Jay Weatherill has announced.

The deal forms a key part of the state government's $550 million energy plan drawn up after last year's highly ridiculed statewide blackout.

It comes after Musk made a public offer to deliver the battery to South Australia within 100 days.

"Confirming the commitment from Tesla CEO Elon Musk to deliver the battery within 100 days or it is free, it has been agreed between Tesla and the South Australian Government that the starting date for the 100 days will be once the grid interconnection agreement has been signed," the statement from the SA government said.

"After leading the nation in renewable energy, the 100MW / 129MWh battery places South Australia at the forefront of global energy storage technology."

The cost of the battery, if delivered on time, was not disclosed in the initial announcement.

Premier Jay Weatherill said the "historic agreement" would have "significant economic spin-offs".

"South Australia has been leading the nation in renewable energy – now we are leading the world in battery storage," he said.

Billionaire Telsa CEO Elon Musk. (AAP)

Elon Musk. (AAP)

"I’m thrilled with the selection of Neoen and Tesla, whose experience and world leadership in energy security and renewables will help South Australia take charge of its energy future.