The Thirty Years’ War lasted as long as it did because it was essentially three conflicts in one:
1. A constitutional crisis within the Holy Roman Empire;
2. A religious war involving Catholics, Lutherans, and Calvinists; and
3. A great power battle involving France, Spain, Denmark, and Sweden.
The war going on in Syria and Iraq today has similar components:
1. A struggle for power within both countries;
2. A sectarian conflict involving Shiites and two factions of Sunnis; and
3. A proxy war between Saudi Arabia and Iran, with the US, Russia, and Turkey pursuing their own interests, as well.
History tells us there is no simple and clean way out of this mess.