Since the Oct. 7 Hamas terrorist attack on Israel, President Biden has had two goals in the Middle East: to support Israel’s right to defend itself against terrorism and to prevent the Israel-Hamas war from escalating into a regional conflagration that would compel the United States to step in.

To prevent a regional war, the Biden administration has used a series of measures over the past 10 months, ranging from diplomacy to beefing up America’s military presence to employing lethal military force. So far, it’s managed to keep multiple low-level conflicts from spiraling into a full-scale conventional war that risks a direct U.S.-Iran confrontation.

But since Iran’s unprecedented attack on Israel in April — and a series of dangerous developments since — the landscape has shifted sharply. Mr. Biden’s playbook may not be enough this time.

Iran’s attack marked a decisive change in its regional strategy — and the security of the Middle East. For decades, Tehran has projected its military force across the region through a network of proxies and militias, a strategy intended to keep fighting out of its territory and to maintain some deniability. But in April, when Iran ignored Washington’s warnings and directly attacked Israel for the first time, Iran moved the goal posts. It’s no longer clear how Iran might use its military and its network. With Israel’s subsequent strike deep inside Iranian territory, America’s script for preventing state-on-state attacks started to fray.

Preventing regional war has been one of Mr. Biden’s priorities from the early days of his administration. After the deadly attack on Israel by Hamas, a terrorist group sponsored by Iran, the Biden administration warned Tehran and its proxies publicly and privately not to go further. Washington reinforced its diplomacy with rapid deployments of more forces and capabilities across the Middle East, including two aircraft carriers.

At the same time, Mr. Biden was directing targeted military strikes against Iran’s proxies, which ramped up attacks on U.S. forces after the war in Gaza began. In the following months, the president ordered unilateral strikes, first against Iran-affiliated infrastructure in Syria, then Iran-affiliated facilities in Iraq, and finally against Iran-aligned militia leaders in Iraq.