TEHRAN, Iran -- A magnitude 6.3 earthquake struck western Iran near its border with Iraq on Sunday night, injuring more than 500 people and sending fearful residents running into the streets, authorities said.

The Sunday temblor hit near Sarpol-e Zahab in Iran's Kermanshah province, which was the epicenter of an earthquake last year that killed more than 600 people and where some still remain homeless.

Dr. Mahmoud Reza Moradi, the head of Kermanshah's university of medical science, told Iranian state television that 513 people were hurt. Most of the injuries appeared to be minor; the semi-official ISNA news agency reported that only 33 people needed to be hospitalized.

Authorities said dozens of rescue teams were immediately deployed after the quake stopped and the country's army and its paramilitary Revolutionary Guard were responding.

Officials reported damage at buildings both in town and in rural Kermanshah, as well as to some roadways. The temblor also downed power lines and caused power outages into the night as temperatures hovered around 8 degrees Celsius (46 degrees Fahrenheit).

The quake struck just after 8 p.m. in Iran, meaning most were still awake at the time and able to quickly flee.

The 6.3 earthquake had a depth of 10 kilometres (6.2 miles), according to the U.S. Geological Survey. Iran state TV gave the depth as 5 kilometres (3.1 miles). Such shallow earthquakes have broader damage.

The earthquake was felt as far away as the Iraqi capital of Baghdad, about 175 kilometres (110 miles) southwest.

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

Last year's earthquake near Sarpol-e Zahab, a predominantly Kurdish town, had a magnitude of 7.3 and injured more than 9,000 people. The region, nestled in the Zagros Mountains, largely rebuilt in recent decades after Iran and Iraq's ruinous 1980s war, saw many buildings collapse or sustain major damage in the 2017 quake.

Sarpol-e Zahab, some 520 kilometres (325 miles) southwest of the Iranian capital of Tehran, suffered half of the 2017 earthquake's casualties.

------

Gambrell reported from Dubai, United Arab Emirates.