After 9/11 the Bush administration said that it needed to pre-emptively deal with the threat of international terrorism. Around the same time in the Zagros Mountains of Iraqi Kurdistan Ansar al-Islam had set up a camp. The group was at war with the ruling Kurdish parties and welcomed foreign fighters to join them. They received money form Al Qaeda, Saudi Arabia, and Iran. After the 2001 U.S. invasion of Afghanistan some al Qaeda fighters and other Islamsts fled Kurdistan to join Ansar. One such group was Abu Musab al-Zarqawi’s Jund al-Sham, which had been driven out of Afghanistan. The group eventually caught the attention of the Bush administration in 2002. By June of that year the Joint Chiefs of Staff presented a plan to the White House recommending an air and ground operation the next month to wipe out the camp. That never happened. As Micah Zenko wrote in an August 2009 article, the main reason appeared to be that the administration was worried that a strike on the Ansar camp might distract from the invasion of Iraq, which was the main priority. If the operation had gone through Zarqawi might have been killed and Al Qaeda in Iraq, and by extrapolation the Islamic State might have never happened. For more, read this longer article about this missed opportunity.
Zenko, Micah, “Foregoing Limited Force: The George W. Bush Administration’s Decision Not to Attack Ansar Al-Islam,” Journal of Strategic Studies, August 2009