ANCHORAGE, Alaska (AP) — A 7.0 magnitude earthquake has rocked buildings in Anchorage and caused lamp posts and trees to sway, prompting people to run out of offices and seek shelter under office desks.

The U.S. Geological Survey says the earthquake Friday morning was centered about 7 miles (12 kilometers) north of Alaska’s largest city.

An Associated Press reporter working in downtown Anchorage saw cracks in a 2-story building after the quake.

It was unclear whether there were injuries.

People went back inside buildings after the earthquake but a smaller aftershock a short time later sent them running back into the streets again.

Officials issued a tsunami warning for coastal areas of southern Alaska but later canceled it.

National Tsunami Warning Center senior technician Michael Burgy said the tsunami warning was automatically generated.

Officials monitored gauges to see if any underwater landslides would generate tsunami waves.

Because there were none, the warning was canceled.

Police had told residents of the island community of Kodiak to head to higher ground.

The quake damaged buildings in Anchorage and buckled roads and sent people running into the streets.

There were no immediate reports of serious injuries or deaths.