Tell me how this war ends. From the beginning, that has been the agonizing question with the Gaza conflict. After seven horrific months, a resolution is still some way off. But some clarity is emerging about the shape of a possible endgame.

The parameters of an eventual conclusion to the war became more evident after a trip to Saudi Arabia and Israel this past weekend by national security adviser Jake Sullivan and his deputy for the Middle East, Brett McGurk. The conversations they had there were outlined to me by knowledgeable sources.

The U.S. officials haven’t drawn a road map; but it does point in the direction of a gradual end to Israeli combat operations and the beginning of a still-fuzzy “day after.”

A new roadblock might be the decision by the chief prosecutor of the International Criminal Court on Monday to seek arrest warrants for Israeli and Hamas leaders, drawing a moral equivalence between the two that President Biden rightly called “outrageous.” One Israeli source told me that the ICC “changes everything, in a way we are yet to understand.”

The easiest way to describe how this war could wind down is by explaining the tentative understandings among the parties, explored through behind-the-scenes talks but not yet explicitly stated. The following points show the state of play.

1. The Gaza war seems to have been contained, avoiding the regionwide conflagration that many feared after Hamas attacked Israel on Oct. 7. This is due in part to quiet talks between Iran and the United States, including a meeting last week in Oman between McGurk and the new Iranian acting foreign minister, Ali Bagheri Kani, whose predecessor died in the helicopter crash on Sunday that killed President Ebrahim Raisi.

Throughout this dialogue, the United States has delivered explicit warnings about how it might respond to Iranian escalation.

The Iran channel has also produced some limits on the country’s nuclear program. Iran has privately agreed to hold its enrichment of uranium to 60 percent and to limit its stockpile of fuel enriched to that level.

A sign of the Iranian-U.S. dialogue is that when Raisi’s helicopter crashed on Sunday, Iran requested urgent help from the United States in locating it, and sent a map showing the likely site, according to a knowledgeable official. U.S. analysts don’t see Raisi’s death as having a significant effect on Iranian actions, internally or externally, because they believe that Raisi wasn’t likely to succeed the aging supreme leader, Ayatollah Ali Khamenei. Instead, they say, Khamenei’s successor probably will be his son, Mojtaba, who is seen as a favorite of the Islamic Revolutionary Guard Corps.

2. Israeli leaders have reached a consensus about a final assault on Hamas’s four remaining battalions in Rafah. Instead of the heavy attack with two divisions that Israel contemplated several weeks ago, government and military leaders foresee a more limited assault that U.S. officials think will result in fewer civilian casualties and, for that reason, Biden won’t oppose. At least 800,000 of the roughly 1.5 million Palestinians who had gathered in Rafah have left, U.S. officials believe.

3. Though Hamas will retain a presence in Gaza, Israeli leaders say about 75 percent of its organized military capacity has been destroyed, and that the Rafah operation will eliminate much of the remaining capability. Hamas appears to have decided not to stand and fight but instead to melt into the population as a guerrilla force.

4. Israel defense officials have agreed on a strategy for “the day after” that will include a Palestinian security force drawn in part from the Palestinian Authority’s administrative payroll in Gaza. This Palestinian force will be overseen by a governing council of Palestinian notables, backed by moderate Arab states such as Egypt, Jordan, the United Arab Emirates and Saudi Arabia.

An important new wrinkle is that Hamas negotiators have told Egypt that they might accept this Gaza governing entity as part of the “transitional arrangement” outlined in the latest draft of a U.S.-negotiated agreement on a cease-fire and release of hostages, according to a knowledgeable official.

5. Saudi Arabia has agreed to a “near final” draft of a security agreement with the United States that would include normalization of relations with Israel. As part of this deal, the kingdom expected agreement on a “credible pathway” toward a two-state solution to the Palestinian problem.

The beginning of an end to the war would be a cease-fire and hostage-release deal, which the Biden administration has been seeking for months. U.S. officials believe talks could resume as soon as this week, even though (or perhaps because) Israel plans a Rafah assault.

Because Netanyahu’s right-wing coalition balks at many of the details, the final dealmaking might fall to a future Israeli government. But you can see, in the distance, the contours of a possible exit ramp.

David Ignatius is Washington Post columnist.