And not ridiculous things that are theoretically possible, like the Taliban does a 180 out of nowhere and converts to socialism and the imperialist states do a 180 out of nowhere and decide that a socialist middle east is cool.
I used to think that the best thing that could happen is a Marshall Plan for the Middle East, but now, I'm not so sure that would be good.
One possibility is that the memory of occupation starts to fade, and the engine for religious fundamentalism starts to slow down. This depends a lot on Salafis and oil revenue though.
Another possibility is that there emerges a strongman who is anti-imperialist with a sort of social pluralism domestically, in the vein of Qaddafi or the Assads.
Whichever way, they're going to have to figure a lot of stuff out by themselves, and it's going to take a long time. But we always knew this.