Did the attacks of 9/11 provide the US with a long-hoped for opportunity to recast global affairs?

The cost of the 'war on terror', both in money and human life has been staggering. Estimates of civilian deaths in Afghanistan and Iraq begin at 250,000 but could be three times as high; 7,500 US and coalition troops have been killed and tens of thousands injured, while 186,000 are still there. The US has officially spent $1.3tn, but some economists insist that the unofficial number is above $4tn.

If 9/11 was a terribly dark day for the US, 9/12 was worse both for the US and the rest of the world. The 9/11 attacks offered Washington an opportunity to recast global affairs in the way it chose.

Some people viewed it as the justification they had long hoped and planned for, a chance in a lifetime to seize the initiative to ensure the US' dominance for future generations.

What exactly happened after the 9/11 attacks and who was behind the decisions being made? What triggered the war in Afghanistan and Iraq?