DUBAI, United Arab Emirates — Israel pounded Iran with a series of airstrikes early today, saying it was targeting military targets in retaliation for the barrage of ballistic missiles the Islamic Republic fired upon Israel earlier this month. Explosions could be heard in the Iranian capital, Tehran, though the Islamic Republic insisted they caused only “limited damage.”

The attack risks pushing the archenemies closer to all-out war at a time of spiraling violence across the Middle East, where militant groups backed by Iran – including Hamas in Gaza, and Hezbollah in Lebanon – are already at war with Israel. It also marked the first time Israel’s military has openly attacked Iran, which hasn’t faced a sustained barrage of fire from a foreign enemy since its 1980s war with Iraq.

Israel’s hourslong attack ended just before sunrise in Tehran, with the Israeli military saying it targeted “missile manufacturing facilities used to produce the missiles that Iran fired at the state of Israel over the last year.” It also said it hit surface-to-air missile sties and “additional Iranian aerial capabilities.”

Israel offered no initial damage assessment.

Initially, nuclear facilities and oil installations all had been seen as possible targets for Israel’s response to Iran’s Oct. 1 attack, but in mid-October the Biden administration believed it had won assurances from Israel that it would not hit such targets, which would be a more severe escalation.

“The regime in Iran and its proxies in the region have been relentlessly attacking Israel since Oct. 7 ... including direct attacks from Iranian soil,” Israeli military spokesman Rear Adm. Daniel Hagari said in a prerecorded video statement early today. “Like every other sovereign country in the world, the State of Israel has the right and the duty to respond.”

The United States warned against further retaliation, indicating that the overnight strikes should end the direct exchange of fire between the Israel and Iran.

Iran’s military said the strikes targeted military bases in Ilam, Khuzestan and Tehran provinces and caused “limited damage,” without elaborating.

Iran’s state-run media acknowledged blasts that could be heard in Tehran and said some of the sounds came from air defense systems around the city.

But beyond a brief reference, Iranian state television offered no other details and even began showing what it described as live footage of men loading trucks at a vegetable market in Tehran in an attempt to downplay the assault.

A Tehran resident told The Associated Press that at least seven explosions could be heard, which rattled the area. The resident spoke on condition of anonymity for fear of reprisals.

People in Tehran could see what appeared to be tracer fire light up the sky as the blasts could be heard.

Other footage showed what appeared to be surface-to-air missiles launching up to the sky and other detonations.

Iran closed the country’s airspace early Saturday, and flight-tracking data analyzed by the Associated Press showed commercial airlines had broadly left the skies over Iran, and across Iraq, Syria and Lebanon.

The White House said President Joe Biden had been briefed and would continue to receive updates.

In Syria, the state news agency SANA, citing an unnamed military official, reported missile fire targeting military sites in the country’s central and southern region. It said that Syria’s air defenses had shot some of the missiles down. There was no immediate information on casualties.

Iran has launched two ballistic missile attacks on Israel in recent months amid the ongoing Israel-Hamas war in the Gaza Strip that began with the Hamas attack on Israel on Oct. 7, 2023. That initial attack killed some 1,200 people and saw 250 others taken hostage back to the seaside enclave.

In the time since, more than 42,000 Palestinians have been killed in Gaza, according to local health officials who don’t delineate between civilians and combatants.

The U.N. has said hundreds of thousands of people have been trapped with little food or supplies as Israeli forces close in on the northern Gaza town of Jabaliya, while food and other aid remains scarce in the enclave. Israeli military operations in the West Bank in the time since have killed hundreds more.

Israel also has launched a ground invasion of Lebanon and a series of punishing airstrikes that have rattled that country.

The strike today happened just as U.S. Secretary of State Antony Blinken was arriving back in the U.S. after a tour of the Middle East where he and other U.S. officials had warned Israel to tender a response that would not further escalate the conflict in the region and exclude nuclear sites in Iran.

White House National Security Council spokesman Sean Savett said in a statement that “we understand that Israel is conducting targeted strikes against military targets in Iran” and referred reporters to the Israeli government for more details on their operation.

Two U.S. officials said the U.S. was notified by Israel in advance of the strikes. They said there was no U.S. involvement in the operation. The officials spoke on condition of anonymity.

Israel had vowed to hit Iran hard following a massive Iranian missile barrage on Oct. 1. Iran said its barrage was in response to deadly Israeli attacks against its proxy in Lebanon, Hezbollah, and it has promised to respond to any retaliatory strikes.

Israel and Iran have been bitter foes since the 1979 Islamic Revolution. Israel considers Iran to be its greatest threat, citing its leaders’ calls for Israel’s destruction, their support for anti-Israel militant groups and the country’s nuclear program.

Israel and Iran have been locked in a yearslong shadow war. But since Hamas’ Oct. 7, 2023, attack, the battle has increasingly moved into the open. Israel has recently turned its attention to Hezbollah, which has been firing rockets into Israel since the war in Gaza began. Throughout the year, a number of top Iranian military figures have been killed in Israeli strikes in Syria and Lebanon.

Iran fired a wave of missiles and drones at Israel last April after two Iranian generals were killed in an apparent Israeli airstrike in Syria on an Iranian diplomatic post.

The missiles and drones caused minimum damage, and Israel — under pressure from Western countries to show restraint — responded with a limited strike. But after Iran’s early October strike, Israel promised a tougher response.

Meanwhile Friday, Israeli strikes on residential areas in southern Gaza killed 38 people, including 13 children from the same extended family, Palestinian health officials said.

In northern Gaza, health officials reported that Israeli forces had raided Kamal Adwan Hospital, one of the few medical facilities still functioning in the area. Israel has renewed its offensive against Hamas in the north in recent weeks, and aid groups are sounding the alarm over dire humanitarian conditions.

In Lebanon, Israeli strikes on the country’s southeast killed three journalists working for news outlets that are considered to be aligned with Hezbollah.

Associated Press writers Amir Vahdat in Tehran, Iran, Abby Sewell in Beirut and Lolita C. Baldor, Farnoush Amiri and Zeke Miller in Washington contributed to this report.