Honestly, religion is the ultimate leash in general; but I think that the conditions in the Middle East could not have happened through religion alone. Exploitation, war, and poverty are probably the main drivers. Religion is just a tool. That's my guess anyway.
There's a lot of really solid evidence for that position.
Historically, religion has been used by the powerful as a means to exert control over the masses - a tool made more powerful still by social and economic repression (as Battuta has been saying). Fundamentalist religion is the vehicle through which power brokers move, and socioeconomic deprivation is the fuel that powers the vehicle.
This fairly basic truth is repeated through history; from Babylon, to Greece, to Rome, to the Crusades, to the Inquisition, to the conflicts that ravaged Ireland for centuries, and through many, many other examples, it should be fairly evident that it is not the belief system of the religion that matters, but the socioeconomic circumstances of the people who practice it and the geopolitical objectives of their leaders.
Islam is only the latest religion to be used in this way. Christians, Jews, Sikhs, Hindus, and yes, even Buddhists have all had their own troubles with mis-use of religious doctrine (and in many cases, still do).
It is no coincidence that fundamentalism and extremism within the broader religion of Islam have only really exploded since the Second World War.