It's been biting the west in the keister for time immemroial too. Vietnam and beyond. That and short term thinking that is biased only to the West's benefit.
I've often argued that America can be a very fair weather friend and ally, which only makes for more rage, which only drives recruitment.