Israel’s military sent dozens of jets to hit multiple targets in Lebanon early Sunday, saying it was striking first after detecting preparations by Hezbollah for an extensive attack.

Israeli media reported a large number of airstrikes, as alerts went off warning residents of northern Israel to take shelter.

The military acted after it saw Hezbollah readying for a missile and rocket attack on Israel, spokesman Daniel Hagari said. The nature of those preparations wasn’t immediately clear. Israel said it struck various missile launchers.

The Lebanese militant group said it had launched a large number of missiles at an unnamed military target in northern Israel, calling it the first stage of its response to Israel’s killing of a top Hezbollah commander in Beirut in July .

Israel said more than 200 projectiles were launched from Lebanon on Sunday, with multiple hits but no reports of injuries. It said some were intercepted.

Defense Minister Yoav Gallant declared a state of emergency across the country Sunday morning, which gives the military the ability to set restrictions on civilians. Gallant and Prime Minister Benjamin Netanyahu oversaw the operation against Hezbollah from Tel Aviv’s military headquarters ahead of convening Israel’s security cabinet Sunday morning.

Israel briefly closed its airspace around its international airport and told civilians in the north and in central areas including Tel Aviv to limit public gatherings until Monday. A passenger on an El Al flight awaiting take off from New York said her pilot announced that the plane was loading up on extra fuel in case of an unplanned diversion.

The strikes come as the U.S. and regional diplomats are working to head off a wider war following a pair of Israel-linked killings in Tehran an Beirut. Iran and Hezbollah have pledged to respond, but had held fire as a new round of talks toward a cease-fire in Gaza took place .

Talks were set to continue Sunday but have been deadlocked over Israel’s insistence on keeping a military presence along the border between Gaza and Egypt.

Hamas, which hadn’t attended the talks, had said it would send delegates to Sunday’s meeting.

While the U.S. pushes ahead with cease-fire talks, it has also beefed up its military assets in the Middle East to help defend Israel from any attack, including bringing in a second aircraft carrier group and a guided-missile submarine.

The sharp uptick in tensions began at the end of July, when Israel killed top Hezbollah commander Fuad Shukr with a strike in Beirut. Hours later, Hamas political leader Ismail Haniyeh was killed by an explosion at a military guesthouse that Iran blamed on Israel.

Israel and Hezbollah have been exchanging fire in recent days, including strikes that killed a number of militants and a heavy barrage on northern Israel, but within the general pattern since Hezbollah began firing rockets at the country following the Hamas-led Oct. 7 attacks on Israel.

Write to Andrew Dowell at andrew.dowell@wsj.com