ANCHORAGE — It lasted just 30 seconds. But that was enough on Friday morning for a magnitude-7 earthquake to rip open roads, send streetlights crashing to the ground and leave Alaska’s quake-hardened residents panicked and reeling.

And it sent Kelsey Green sprawling to the floor.

At her office in Anchorage, windows shattered and ceiling tiles rained down. When it was over, Ms. Green and her co-workers ran outside into a world that had been shaken up like a snow globe. There was now a 50-foot crack in the parking lot.

“I’ve never experienced an earthquake like this,” said Ms. Green, 27, a fourth-generation Alaskan. “It rattled me to my core.”

While there were no reports of deaths or serious injuries, officials said the quake had crippled southern Alaska’s infrastructure and could take weeks or longer to repair. Highways were partly swallowed up by the snowy earth. Around 40,000 people were left without power and there were widespread reports of collapsed and damaged buildings and bridges, and broken water lines.