Nearly 20 years ago, the United States invaded Afghanistan with the intent of either killing or capturing Osama bin Laden, the leader of the international terrorist organization, al-Qaeda. Al-Qaeda was responsible for carrying out the September 11, 2001 terrorist attacks against the U.S. In the process of the invasion, American forces overthrew the Taliban, an Afghan group that had come to rule the country in the 1990s.

Now, as the U.S. withdraws from Afghanistan and the Taliban is reasserting control over the country, Afghan civilians and American troops have been targeted by suicide bombers belonging to a third group, known as ISIS-K. The attack at the airport in the capital, Kabul, was one of the deadliest since the war began in 2001; over 170 people were killed, mostly Afghan citizens but also including 13 U.S. soldiers. Because the history and motives of these groups, as well as the cooperation and conflicts between them, can be confusing, here is a brief guide to the groups that have fought against American forces in Afghanistan and continue to battle amongst themselves as the U.S. leaves.