(CNN) At least 361 people were injured in a 6.3 magnitude earthquake that struck near the border with Iraq, Iran's semi-official Fars News Agency reported.

Sunday's quake in the western part of Iran was about 6 miles deep, the US Geological Survey said.

Buildings were damaged in various rural areas in SarPol-e zahab and Qasr-e-Shirin, causing walls of some homes to fall, says Fars.

Panicked residents in some affected areas ran into the streets, Iran's state-run IRNA news reported.

People arrive for medical treatment at a hospital in Sulaymaniyah, Iraq.

Tremors could be felt as far away as Baghdad. Social media users in the Iraqi capital uploaded videos of furniture moving and chandeliers swinging.

Read More