But with the spotlight comes vulnerability. Militant factions in Gaza, the Israeli military and analysts all said the song contest played into the timing of the latest escalation, during which Palestinian militants fired 690 rockets toward Israel.

AD

The bombardment killed four Israelis, the first civilian casualties from Gaza rocket fire since 2014. Israeli airstrikes carried out in response killed more than 20 Palestinians, including at least one woman and two children.

AD

Hamas, the Palestinian militant group that controls the Gaza Strip, said it saw a moment to pressure Israel to fulfill its demands under a longer-term truce, including easing trade restrictions on Gaza, where unemployment exceeds 50 percent.

Israel, in this view, would be reluctant to retaliate, not wanting to enter a protracted conflict that could overshadow the song contest, which draws about 200 million television viewers. Other important national holidays fall this week, such as independence day starting Wednesday evening, and Prime Minister Benjamin Netanyahu is in the thick of negotiations as he tries to forge a new government.

AD

“There was definitely a sense that Israel would not want an escalation before Eurovision,” said Tareq Baconi, an analyst at the International Crisis Group who specializes in Israeli-Palestinian issues. “There is a brief window now, while [Netanyahu] is in coalition discussions, that he might be more flexible. And there was a sense that if they were able to hit during that brief window, they might be able to achieve something.”

AD

The underlying factors are the same as those that have driven prior rounds of conflict, Baconi said, citing Gaza’s looming economic collapse, which is driving internal pressure against Hamas.

Ramadan, the Islamic holy month of dawn-to-dusk fasting that began Monday, makes the economic situation all the more acute. Despite prior truce agreements that have called for continued cash assistance from Qatar, solutions to Gaza’s electricity crisis and expansion of fishing rights, there had been little movement.

AD

The enclave’s calculation appears to have paid off. When news of the rocket fire broke, Eurovision dominated the discussions of pundits on Israeli television channels. International teams were already arriving for next week’s competition.

Emerging from a 4½ -hour cabinet meeting, Netanyahu and other attendees said the Gaza campaign would continue. But Israeli media reports said Israel’s political leadership had ordered the army to wrap up operations before the start of the Eurovision contest.

AD

Tel Aviv, where Madonna is to perform, is within the range of Hamas and Islamic Jihad rockets in Gaza.

“For the Israeli side, this timing was one of the worst ever,” said Shaul Shay, a former deputy head of Israel’s National Security Council. “With all the sensitivities,” the Israeli leadership decided that the best solution “for the time being was to stop,” he said.

AD

“But again, Netanyahu said it was not over, and in the end it will be necessary to get to a point to solve it either politically or militarily,” Shay added.

Writing in the Yedioth Ahronoth newspaper, the columnist Alex Fishman dubbed the conflagration the “Peace for Eurovision Operation.”

Hamas on Tuesday thanked Qatar for a pledge of $480 million for Palestinians in Gaza and the West Bank. The fact that $30 million in monthly Qatari assistance had not been making it into Gaza, as stipulated under a cease-fire agreement in March, had been a major point of contention for Hamas.

AD

“The resistance is keen to not give the enemy a chance to cheat the world by organizing the Eurovision in quiet time, and trying to motivate global forces against Palestinian rights,” said an Islamic Jihad spokesman.

AD

Israel has accused Islamic Jihad specifically of triggering the confrontation. But Baconi said that as Israel negotiates with Hamas, the Israeli side has specific interests in stressing that it does not view Hamas as the party responsible for starting the latest clash.

“Islamic Jihad often instigates, but this is not what’s happening here,” he said. “The factions are coordinating to get Israel to pay up.”

Retired Israeli army Col. Michael Milstein, who served as an adviser on Palestinian affairs, said he does not think that Islamic Jihad is working without coordination with Hamas. But he assessed that the flare-up had escalated organically and that Hamas had not been looking for a confrontation, although it took advantage of the timing when the opportunity arose.

AD

AD

“The only player that gained something from this escalation was Qatar, which emerged as the Palestinian hero,” he said. “Everyone else is back to square one. The situation is very fragile.”

Meanwhile, pressure is building on Netanyahu to take more decisive military action.

Israel has only two real options, said Kobi Michael, a senior research fellow at Israel’s Institute for National Security Studies. “I think we have to make all the possible effort to give another chance to the calm agreement, make changes that are significant to civilian aspects even though that is considered by some in Israel as a weakness,” he said. “We have to give it another chance, and if it does not work, then we will have no other option but to enter into Gaza and finish the military wing of Hamas.”

AD

“Hamas must go,” tweeted Michael Oren, a former ambassador of Israel to the United States. “Right after our holidays and Eurovision, Israel must evict Hamas from Gaza. The U.S. should back us militarily and diplomatically and, together with Arab states, commit to Gaza’s renewal.”

AD

In the Israeli city of Ashkelon, where two Israelis died in rocket fire, Eliran Kahlon, 30, said he was frustrated that a cease-fire had been declared.

“We don’t care if they cancel Eurovision, or the independence day celebrations. There needs to be an end. We need to go in,” he said, referring to a new war. “Or if more investment and money brings peace, I don’t have a problem with that,” he added. “I just want to live in quiet.”