Iraq has also been sovereign for a long time post-Saddam.
_________________________________________________
With a government approved of by the US. We would not have left unless the goverment was acceptable...in effect a puppet regime. But to claim that our excuse for invading and nation-building those two countries is justified solely on the grounds of the 911 attacks is certainly no stronger than any argument that Russia could conjure up in defense of their own invasion of Ukraine. To argue that we were attacked by Iraq or Afghanistan in any meaningful way is so great stretch that anyone other than a hopelessly blind hawk will see it as weak sauce.
An attack on the Pentagon was not a justification for war against al-Quaeda based in Afghanistan? Okay. Let me guess, you probably think Pearl Harbor was no big deal. Only 2,400 or so killed way off in Hawaii. No need to declare war on Japan.