Elon Musk, founder, CEO and lead designer at SpaceX and co-founder of Tesla, speaks at the International Space Station Research and Development Conference in Washington, July 19, 2017.

ADELAIDE, Australia — The state of South Australia announced on Friday that it had powered up the world's biggest battery ahead of schedule: a feat already being heralded as one of this century's first great engineering marvels and a potential solution to the country's energy woes.

The battery is the size of an American football field. It is capable of powering 30,000 homes, and its rapid deployment reflects the union of a blackout-prone state and a flashy entrepreneur, Elon Musk, the founder of Tesla Motors, who pledged to complete its construction in 100 days or do it for free.

"This is history in the making," said Jay Weatherill, the premier of South Australia. In a statement, Tesla said the completed battery "shows that a sustainable, effective energy solution is possible."

Debate over the battery's potential has become intense. Federal lawmakers who favor fossil fuels argue that its impact is being exaggerated, while supporters gush that the state's embrace of Mr. Musk could change the future of energy in Australia — and the world.

Regardless, experts say, the moment of disruption is here.

More from The New York Times:

Markets Pass Another Milestone, as Investors Remain Fearless

Trump Says G.O.P. Tax Bill Won't Benefit Him. That's Not True.

Energy Idea for Mars Yields a Clue for Powering Data Centers



And it all started with a tweet, read on a couch.

Mr. Weatherill, a Labor Party politician who has tried to promote his state as a magnet for innovation since taking office in 2011, was at home on his sofa in March when his phone began lighting up.

He was just days away from announcing a plan to deal with the power failures that had plagued his state for years.

On his phone came Twitter notification after Twitter notification with news that would upend his plan: Mr. Musk had offered to build the most powerful battery ever made, and do it faster than ever imagined.

Recalling that moment, Mr. Weatherill said he started to sweat. If he embraced Mr. Musk's proposal, would it look like a billionaire American entrepreneur was strong-arming his state into redefining its energy policy? Was Mr. Musk's offer real, or merely a publicity stunt?

When Mr. Musk was asked by the Australian entrepreneur (and fellow billionaire) Mike Cannon-Brookes "how serious" he was about his offer, the American mogul doubled down.

"Tesla will get the system installed and working 100 days from contract signature or it is free," Mr. Musk tweeted. "That serious enough for you?"

Elon Musk tweet: Tesla will get the system installed and working 100 days from contract signature or it is free. That serious enough for you?

"Of course, the whole thing then exploded, and everyone's piling on me, saying 'Grab it!'" Mr. Weatherill said at a conference in Adelaide, the state's capital, in September.

For Mr. Weatherill, the project has been a repudiation of a federal policy that de-emphasizes renewable energy. For Mr. Musk, the battery has been a headline-grabbing venture that could prove that his radical vision of the world's energy future is both functional and economical.

"This fits into his M.O. of doing these big, grandstanding things to get attention for the company and the technology that he's building," said Ashlee Vance, the author of a 2015 biography of Mr. Musk. "Tesla's at this really critical stage where they're trying to be both a car company and an energy company at the same time."

Australia is a fitting target for Mr. Musk. The country is the world's largest exporter of coal. By most measures, it is the sunniest continent on earth. It has abundant wind and hydroelectric power capabilities. And yet the cost of electricity in Australia increased 20 percent from 2012 to 2016, and Australians this year paid between 50 and 100 percent more for their power than Americans, according to experts.

South Australia has the highest electricity prices in the world. This imbalance of supply and demand has resulted in regular blackouts and astronomical bills for the state's 1.7 million residents.

The high-capacity Tesla battery does not create energy, it just stores it. The state already invests in wind and solar energy. The battery would give it a bank of saved energy, which could ease pressure during periods of high demand and help better manage the electrical grid.

"More than 40 percent of South Australia's electricity is coming from wind, which is good," said Tony Wood, an energy director at the Grattan Institute, a think tank. "But the consideration of how to integrate it — and manage that intermittency — wasn't so good."

The day after Mr. Weatherill was roused from his couch in March, he and Mr. Musk spoke on the phone about the proposal. The Australian, knowing the tech mogul's ability to stir the news media, had one demand: If Tesla were to win the contract, Mr. Musk would appear in South Australia to announce it to the world.

"He usually doesn't come for announcements of winning a tender," Mr. Weatherill said, "but he said he'd come."

Mr. Musk nearly broke his promise, after a rocket launch by his company SpaceX was delayed. But in September, Mr. Musk arrived in Adelaide to announce the $50 million deal and to start the 100-day countdown to the project's completion.

"What this serves as is a great example to the rest of the world of what can be done," Mr. Musk said at the time, adding that half the battery had already been finished.

Mr. Musk declined to be interviewed for this article.

In March, when Mr. Musk first presented his proposal, Prime Minister Malcolm Turnbull spoke with the entrepreneur and tweeted enthusiastically about its potential.

Malcolm Turnbull tweet: Thanks @elonmusk for a great in depth discussion today about energy storage and it's role in delivering affordable & reliable electricity

Months later, when Tesla and the French renewables company Neoen were awarded the contract, however, Mr. Turnbull's Liberal Party government assailed the battery project and continued its attack on South Australia's energy policy.

"30,000 South Australian households could not get through watching one episode of 'Australia's Ninja Warrior' with this big battery," said Scott Morrison, the country's treasurer.

Mr. Turnbull's government has promoted fossil fuels over renewable energy to stimulate growth and prevent South Australia's power shortages. The government has questioned the battery's capacity, implied the state has been hoodwinked by a clever salesman and suggested that Mr. Weatherill was looking for publicity ahead of a 2018 election.

"The Tesla battery has been sold to the people of South Australia as an answer to their woes," Josh Frydenberg, the energy minister, wrote in an email. "But in reality it is just a fraction of the storage and backup that South Australia needs."

Franck Woitiez, the general manager of Neoen's Australia division, which will operate the battery from its wind farm, said the Turnbull government was out of touch with the future of renewable energy.

"There's no turning back," said Mr. Woitiez. "It's not tomorrow, it's now."

The next several weeks, the beginning of Australia's summer, will be crucial for judging the battery's success.

"Summer is when Australia gets its peak demand," said Mr. Wood, the energy researcher. "It will be a very important and high-profile demonstration in the role that batteries can play."

But some experts said the stakes would be even higher for Mr. Musk. He could shop the idea globally — if it works.

"He needs these battery packs to really become effective," said Mr. Vance, Musk's biographer. "He needs this to justify the entire reason of Tesla's existence."