TEHRAN — Iranians spent the night digging through rubble in a frantic search for survivors, hours after an earthquake with a preliminary magnitude of 7.3 struck Sunday evening, killing more than 200 people, officials said.

More than 1,600 people in Iran were injured after the quake struck near Ezgeleh, a town near the border with Iraq, according to Iran’s Crisis Management Organization.

At least six people were killed in Iraq, according to news reports, but the government in Baghdad did not release an official death toll.

Particularly hard hit was Sarpol-e Zahab, a city in the western Iranian province of Kermanshah, according to the semiofficial Iranian Students News Agency.

“My friend was screaming, saying, ‘I lost my home,’” one resident wrote on Twitter. “Thank God, she and her family are doing well. She said people were only mourning and their loved ones were under the rubble.”

Photographs from Sarpol-e Zahab, posted on the internet, showed collapsed buildings, cars destroyed by rubble and people sleeping on the streets in fear of aftershocks.

One image appeared to show the near destruction of an apartment block recently built for the poor. Another, posted on the website Khabar Online, showed a pickup truck transporting victims under colorful blankets.

Ayatollah Ali Khamenei, Iran’s supreme leader, delivered a message of condolence on Monday in which he urged rescuers to keep searching for survivors. “The officials should hasten in these first hours with all their might and determination to help the injured, especially those trapped under the rubble,” his office reported.

Farhad Tarji, a member of Parliament for Sarpol-e Zahab, told the semiofficial news agency ILNA that his family had been hit hard by the quake. “I’ve lost 15 people,” he said.

Iranian officials put the epicenter of the quake inside Iran, near the border town of Ezgeleh. The region is a patchwork of farms and is home to many Kurds, a large ethnic minority in Iran.

Initial reports from the Kurdish region of Iraq indicated less damage and fewer deaths on that side of the border. In Sulaimaniya, the second-largest city in Iraq’s Kurdish region, residents described feeling heavy tremors but said there was no notable building damage. Residents in the oil-rich town of Kirkuk, some 50 miles to the west, reported similar damage.

The earthquake was felt as far as the Mediterranean coast of Israel. Shiite pilgrims in the Iraqi city of Kerbala, for the annual religious commemoration of Arba’een, posted videos of people gathering on the streets after the earthquake occurred.

Iran lies on dozens of fault lines and is prone to quakes. In 2012, a double earthquake in the north of the country killed 300 people. When ordinary Iranians learned of the government’s lackluster relief efforts, some started organizing aid groups themselves. In 2003, more than 20,000 people were killed and an ancient citadel was destroyed in the southern city of Bam.

After that quake, the United States, which does not maintain normal diplomatic relations with Iran, sent several planeloads of aid.