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.