Tell me how this ends.” So said then-Maj. Gen. David Petraeus to the journalist Rick Atkinson soon after the U.S. invasion of Iraq in 2003. As far as we can see today, the answer to Gen. Petraeus’s prescient rhetorical question appears to be that it doesn’t.

What many strategists predicted would be a generation-long struggle against Islamic extremism and sectarianism in the Middle East is now well into its second generation. It has been almost 40 years since the Iranian revolution and the Soviet invasion of Afghanistan; 35...