Iraq's meteorology center advised people to stay away from buildings and not to use elevators, in case of aftershocks.
The quake was said to have a magnitude of 7.3, although earlier reports said it had been 7.2, according to Daily Mail. The centre was reported by the USGS to be in the southeast of Iraq's Sulaymaniya province, close to the Iranian border.
Eight villages were damaged in Iran from the quake, state television reported.
An natural disaster measuring 7.2 on the Richter scale has rocked northern Iraq, the US Geological Survey said on Sunday.
"Four people were killed by the earthquake" in Darbandikhan, the Iraqi town's mayor Nasseh Moulla Hassan told AFP.
Several people posted videos of swaying light fixtures to social media.
Iran's semi-official Iranian ILNA news agency says at least 14 Iranian provinces were affected.
A TASS correspondent reported from Kuwait City that earth tremors had been felt in that city.
The quake struck the mountainous area of Sulaimaniyah province at 9:18 pm (1818 GMT) at a depth of 25 kilometres (15 miles), the monitor said.
In the town of Diyarbakir, residents also left their homes before returning.
According to the U.S. Geological Survey, the quake struck 15.5 miles beneath the surface about 20 miles from Halabjah, Iraq.