When firefighters were called to an Arizona Public Service Co. facility in Surprise earlier this year for a fire, they didn't know there were giant batteries inside, storing energy for future use on the electrical grid.

They found out when they got to the scene, and conducted tests before entering the building.

After firefighters had entered, the place exploded. Four firefighters were injured.

As the investigation into the April 19 explosion continues, Valley cities are enacting new laws to try to make sure something similar doesn't happen again.

"Once you have an incident that hurts firefighters, it wakes us all up," said Brian Scholl, deputy fire marshal for the Phoenix Fire Department.

This summer, Phoenix, Peoria and Surprise enacted laws that for the first time address how giant batteries are stored. Mesa is considering doing the same.

Fire officials in Phoenix and Surprise are pushing other cities to enact the laws, and hope they will soon become consistent across the Valley and state.

New battery rules for utilities, businesses and homeowners

The new laws apply to homeowners, businesses and schools installing giant batteries to store energy from solar panels or for electric vehicles.

Perhaps most notably, though, the laws also include new rules for public utilities that build battery storage facilities along the grid to store energy — as APS had done in Surprise at the company's McMicken site.

Utilities now need to notify cities when building the facilities, receive permits and inspections, and build the facilities with certain safety features.

Surprise Fire Chief Tom Abbott says the laws will allow first responders to know where the batteries are located, and to ensure that the batteries are stored in a way that offers protections to firefighters and the public.

After the Surprise explosion, the cities began working together to come up with the rules, with help from fire officials in New York City.

They used the International Fire Code as their starting point, Scholl said, and made small tweaks so that the rules made sense for the region.

No local rules previously existed for battery energy storage

Giant batteries are made of packs of lithium-ion batteries, such as those in laptops and cellphones.

The use of giant batteries to store energy along the grid, and at homes and businesses, is becoming more common across the country as the use of renewable energy increases.

In Arizona, APS announced in February that it would add 850 megawatts of battery storage by 2025.

For now, though, APS has taken its two remaining energy storage facilities offline.

National groups such as the National Fire Protection Association have federal standards for how to store and install batteries, but until now there were no local laws enforcing the standards.

Those advocating for the burgeoning energy storage industry are pushing for safe installation and storage of batteries as the industry grows.

Codes and standards are important throughout the entirety of the electric utility industry, including energy storage, said Kelly Speakes-Backman, CEO of the Energy Storage Association, a national trade association focused on energy storage policy.

As cities enact laws on this topic, Speakes-Backman said it's important they use federally recognized industry standards as a baseline, such as those from the National Fire Protection Association, and that consistent rules are enacted across jurisdictions.

Incidents such as the one in Surprise are rare, she said, and following safety standards will keep the risk low.

What are the changes for homeowners?

Many of the large lithium ion batteries installed by homeowners are for electric car batteries, and storage of rooftop solar energy, Scholl said.

The new laws regulate where residents can store the batteries on their property. They vary by city.

Generally, homeowners are not allowed to store the batteries inside their house. Surprise and Peoria allow the batteries inside utility closets.

They generally can be located in garages and outside the home, following certain rules.

"With a lithium ion battery, when they overheat, they go through thermal runaway," Abbott said. "It generates an incredible volume of combustible and toxic gases."

That leads to danger inside houses, Abbott said, especially when there is a fire.

In Phoenix and Peoria, residents must get a city permit to install the batteries, although the rule is not retroactive to those residents who already have batteries. In Surprise, no permits are required for residential energy storage at this time.

Having homeowners get permits for their batteries will allow the fire department to keep track of which houses have the batteries, which will be important to know when responding to emergencies, Scholl said.

Can cities tell utilities what to do?

A question that arose is, who has the authority to make local laws for battery storage that apply to utilities?

As of April, after the explosion happened, local authorities were still figuring that out, according to yourvalley.net.

The Arizona Corporation Commission regulates public utilities, including the public health and safety aspect of energy storage systems, said Nicole Capone, a commission spokesperson.

Cities, though, have the right to require public utilities to follow their rules for how energy storage systems are built, Capone said, and what fire codes they must follow. Cities can require permits and inspections as well.

The Arizona Republic asked local fire officials whether they are requiring public utilities to apply for permits when building new battery energy storage facilities.

Surprise and Peoria said they will.

"If a utility company wants to build in our city limits, we are going to try and regulate as much as we can for the safety of the citizens in the vicinity and our firefighters responding to emergencies inside these facilities," said Michael Selmer, a spokesman for the Peoria Fire-Medical Department.

Scholl, in Phoenix, though, at first said that public utilities in Phoenix would not be required to file permits, because the utilities are regulated by the Corporation Commission.

After The Republic received clarification from the Corporation Commission that cities could indeed require public utilities to follow the rules, Scholl said that Phoenix will require the utilities to comply with the new laws.

What are the changes for utilities?

When the call came in for the Surprise fire, Abbott said that firefighters did not know the batteries were at the facility.

But Scott Bordenkircher, APS' director of technology innovation, said APS told Surprise about the batteries when the site was first built in 2016.

APS met at the time with the city and the Fire Department to explain that batteries would be housed there, and provided engineering drawings and information about the batteries, Bordenkircher said.

APS now realizes there are improvements it can make in how it communicates with cities to ensure they stay informed about their battery storage sites, Bordenkircher said.

During the new permitting process, utilities must include construction documents with the layout of the system, information about the batteries, and details of the emergency system.

The new rules for how exactly the storage facilities are built would have changed the way that the McMicken system was constructed.

The McMicken system had a full fire suppression system and sensors inside for monitoring smoke, energy and temperature, Bordenkircher said.

But it didn't have two elements that Abbott said are among the most crucial parts of the new law.

First, the law requires utilities to make sure the building has a ventilation system that will not make it possible for toxic or combustible gases to build up within the facility, Abbott said.

There was no venting system in the McMicken system, Bordenkircher said, in part because venting would have impeded the work of the fire suppression agent that was installed.

The law also requires a monitoring panel outside of the building that shows the status of the equipment and environment.

There was a monitoring panel inside the McMicken system that sent information to APS, Bordenkircher said, but there was no panel outside of the building, meaning that the firefighters who arrived did not have access to the information on site.

APS is working with Surprise to let the city know what it finds in its investigation of the McMicken incident, Bordenkircher said, so that as the city makes new laws it knows it is making changes that will directly improve the safety of the systems.

Abbott and Scholl want the same rules in place across the state.

"The goal is to get everyone on the same page, which is also better for the customers and helpful for responders," Scholl said.

Reach the reporter at jen.fifield@azcentral.com or at 602-444-8763. Follow her on Twitter @JenAFifield.

Support local journalism. Subscribe to azcentral.com today.