ANCHORAGE, Alaska — Back-to-back earthquakes measuring 7.0 and 5.8 rocked buildings and buckled roads Friday morning in Anchorage, prompting people to run from their offices or take cover under desks and triggering a warning to residents in Kodiak to flee to higher ground for fear of a tsunami. The U.S. Geological Survey said the first and more powerful quake was centered about 7 miles north of Anchorage, Alaska's largest city.

Officials eventually canceled a tsunami warning for coastal areas of southern Alaska after the earthquake. Police in Alaska's Kodiak island community had told residents to head to higher ground after the tsunami alert was issued.

An Associated Press reporter saw cracks in a building. It was unclear whether there were injuries.

Get Breaking News Delivered to Your Inbox

Photographs posted to social media sites showed damage that included collapsed ceiling tiles at an Anchorage high school and buckled roadway pavement in places.

Damage is seen after an earthquake rocked buildings in downtown Anchorage. Josh Bierma

Dramatic video and pictures of the quake's aftermath started to surface on social media.

Ceiling is falling down pic.twitter.com/ZPY6fhEPrp — Chase (@Chase_AK) November 30, 2018