the vast majority of the US, and many of our allies, were on board for an invasion of the Middle East (Afghanistan) in 2001 after 9/11.
Spain did support the US in the war in Afghanistan after 2001. They did not support the invasion of Iraq in 2003.