At least five people have died and hundreds injured after a major magnitude 5.9 earthquake struck northwestern Iran in the early hours of Friday morning.

The initial quake struck Tark county, a rural area about 35 miles from the town of Hashtrud in East Azerbaijan Province, officials said.

It was followed by more than 40 aftershocks, forcing residents to rush out of their homes in fear. State media reports described many of the injuries as coming while people were fleeing in panic.

Rescue teams have been dispatched to the region, officials said, but with the epicentre in the remote Alborz Mountains some 250 miles northwest of the capital Tehran, no video or still images have yet been broadcast showing the extent of the damage.

The head of Iran's emergency medical services, Pirhossein Koulivand, gave the casualty figures to state television. He said that while 312 people were injured, only 13 needed to receive hospital treatment.

In photos: British-flagged tanker seized by Iran Show all 13 1 /13 In photos: British-flagged tanker seized by Iran In photos: British-flagged tanker seized by Iran A speedboat of Iran's Revolutionary Guard moving around the British-flagged oil tanker Stena Impero Tasnim News Agency/AP In photos: British-flagged tanker seized by Iran Crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran A satellite image of the Iranian port city of Bandar Abbas reveals the presence of the seized British oil tanker, the Stena Impero on July 22 Maxar Technologies/Reuters In photos: British-flagged tanker seized by Iran Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran Iranian Revolutionary Guards patrolling around the captured British-flagged tanker Stena Impero as it's anchored off the Iranian port city of Bandar Abbas AFP/Getty In photos: British-flagged tanker seized by Iran epa07733612 A handout photo made available by Iranian state-run IRIB News Agency on 22 July 2019 shows crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz on 19 July 2019. Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July 2019. EPA/IRIB NEWS AGENCY / HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES IRIB NEWS AGENCY / HANDOUT EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran A satellite image of the Iranian port city of Bandar Abbas reveals the presence of the seized British oil tanker, the Stena Impero on July 22 Maxar Technologies/Reuters In photos: British-flagged tanker seized by Iran A speedboat of the Iran's Revolutionary Guard moves around a British-flagged oil tanker Stena Impero AP In photos: British-flagged tanker seized by Iran epa07733614 A handout photo made available by Iranian state-run IRIB News Agency on 22 July 2019 shows crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz on 19 July 2019. Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July 2019. EPA/IRIB NEWS AGENCY / HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES IRIB NEWS AGENCY / HANDOUT EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran In this photo released by state-run IRIB News Agency, which aired on Monday, July 22, 2019, shows cooks in the galley of the British-flagged tanker Stena Impero that was seized by Tehran in the Strait of Hormuz on Friday. The Associated Press cannot independently verify the condition of the crew members, but in the video they looked to be in good health and it didn't appear as though they were being filmed under duress. (IRIB News Agency via AP) AP In photos: British-flagged tanker seized by Iran epa07733619 A handout photo made available by Iranian state-run IRIB News Agency on 22 July 2019 shows crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz on 19 July 2019. Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July 2019. EPA/IRIB NEWS AGENCY / HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES IRIB NEWS AGENCY / HANDOUT EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran epa07733613 A handout photo made available by Iranian state-run IRIB News Agency on 22 July 2019 shows crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz on 19 July 2019. Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July 2019. EPA/IRIB NEWS AGENCY / HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES IRIB NEWS AGENCY / HANDOUT EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran epa07733616 A handout photo made available by Iranian state-run IRIB News Agency on 22 July 2019 shows crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz on 19 July 2019. Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July 2019. EPA/IRIB NEWS AGENCY / HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES IRIB NEWS AGENCY / HANDOUT EPA/IRIB News Agency

The US Geological Survey said the quake's epicentre was at a relatively shallow depth of 10km (6.2 miles). State media reports said 30 homes were destroyed in a village at the epicentre.

Though Iran is on major seismic faults and experiences one earthquake a day on average, its last major tremor was in 2017 when a magnitude-7 quake killed more than 600 people and injured thousands.

In 2003, a magnitude-6.6 earthquake flattened the historic city of Bam, killing 26,000 people.