TEHRAN, Iran (AP) — A magnitude 5.9 earthquake struck northwestern Iran early Friday, killing at least five people and injuring over 300 others, officials said.

The temblor struck Tark county in Iran's Eastern Azerbaijan province at 2:17 a.m., Iran's seismological center said. The area is some 400 kilometers (250 miles) northwest of Iran's capital, Tehran.

Over 40 aftershocks rattled the rural region nestled in the Alborz Mountains, and residents rushed out of their homes in fear. The quake injured at least 312 people, state television reported, though only 13 needed to be hospitalized. It described many of the injuries happening when people fled in panic.

The head of Iran's emergency medical services, Pirhossein Koulivand, gave the casualty figures to state television. There were no immediate video or images broadcast from the area.

Rescuers have been dispatched to the region, officials said. State TV reported the earthquake destroyed 30 homes at its epicenter.

The U.S. Geological Survey said the quake's epicenter was at a depth of 10 kilometers (6.2 miles). Shallow earthquakes tend to cause more damage.

Iran is on major seismic faults and experiences one earthquake a day on average. In 2003, a magnitude 6.6 earthquake flattened the historic city of Bam, killing 26,000 people.

A magnitude 7 earthquake that struck western Iran in 2017 killed more than 600 people and injured more than 9,000.

___

Associated Press writers Amir Vahdat and Mehdi Fattahi in Tehran, Iran, and Jon Gambrell in Dubai, United Arab Emirates, contributed to this report.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.