Two men have been charged with the Christmas Day attacks on four electrical substations near Tacoma, Washington, that knocked out power to some 14,000 homes and businesses, authorities said Tuesday.

While federal authorities have long said the country’s power grid is vulnerable to domestic and foreign terrorists, the suspects may have been motivated by loot from the robbery, prosecutors said.

Matthew Greenwood, 32, and Jeremy Crahan, 40, both from nearby Puyallup, were planning to rob a business, which would have been easier if power was not available for security, cameras, lighting and other items, they said. federal prosecutors.

They said the men carried out the robbery during the power outage, according to court documents.

Greenwood was also charged with possession of unregistered firearms, a short-barreled shotgun and a short-barreled rifle, authorities said.

It was not clear if the men had lawyers. The federal public defender’s office for Western Washington did not immediately respond to a request for comment. The case was filed on Saturday and opened on Tuesday.

Prosecutors with the US Attorney’s Office for Western Washington, who worked with the FBI on the case, said cellphone location data was key in locating the defendants, whose devices placed them in the area of substations during the crimes, they said.

The two have been in the SeaTac Federal Detention Center since they were taken into custody, and the US attorney’s office said prosecutors will ask a judge to keep them behind bars pending future hearings.

FBI Special Agent Mark Tucher said in the affidavit that Greenwood admitted to detectives that he entered each of the four substations on Christmas Day and purposely damaged the equipment.

The attacks appeared to successfully target substation high-side switches, devices that can connect or disconnect a powerful power source, authorities said in court documents.

At the Elk Grove and Graham substations, «de-energizing faucets» were so damaged that full repair could take 36 weeks and cost up to $3 million, prosecutors said in court documents. Although power has been restored to the region, output from those two substations has dropped from 50 megawatts to 15, officials said.

The Graham and Elk Plain substations are operated by Tacoma Power; the Kapowsin and Hemlock substations are operated by Puget Sound Energy.

The attacks came after someone shot at a pair of substations in Moore County, North Carolina, on December 3, causing widespread blackouts for 45,000 customers that lasted nearly four days.

Authorities said they are investigating a theory that the blackouts were meant to thwart a drag queen holiday event in Southern Pines, North Carolina, dubbed «Downtown Divas.»

Anti-LGBTQ protesters had targeted the event in the days leading up to its performance at the Sunrise Theatre. Organizers said the blackout did not force them to cancel immediately, going on for 45 minutes amid the glare of cellphone lights.

In February, three men accused of conspiring to attack electrical substations as part of an attempt by white supremacists to sow national unrest pleaded guilty to federal charges of providing material support to terrorism.