Power is back on for nearly 39,000 people in Seattle after a raccoon got into an electrical substation and knocked out power.

The outage covered a wide area starting around 2:45 a.m. Wednesday.

>> Read more trending stories

Jeffrey Pierce, who lives in Fremont, said he woke up to the sound of an explosion. He walked to a nearby power substation and saw crews walking around inside the fence.

“I realized there were two workers in hard hats with flashlights with a raccoon between them," Pierce said. "They were like, 'This guy is really dazed,' and I was like, 'He is?' And they said, 'Yes, he’s the one that knocked out all the power,' and I was amazed.”

Seattle City Light spokesman Scott Thomson told KIRO 7 that the raccoon responsible for the outage was electrocuted and was not the same one neighbors saw.

One of the homes affected by the outage belongs to Athima Chansanchai.

Chansanchai, who lives in Fremont, realized that the power was out when her smoke detector started going off just before 3 a.m.

"Everything was completely dark, completely still," Chansanchai said. "I looked outside and I realized all the lights were out."

She said her biggest concern was the food in her refrigerator going bad, because at one point crews estimated that power wouldn't come back on until about 9 a.m.

"When I realized this might last more than an hour so I start moving things from the fridge to the freezer," Chansanschai said. "Eggs, cheese and stuff like that."

Seattle City Light got electricity restored to all customers by 5:30 a.m.

Animals in the Pacific Northwest are at increased risk for electrocution because of the wet weather. Puget Sound Energy has a program in place to relocate animals for their own safety and to prevent outages.