Following the withdrawal of NATO troops in 2021, the Taliban launched a massive military offensive in May 2021, allowing them to take control of the country over the following three and a half months. The Afghan Armed Forces rapidly disintegrated. The institutions of the republic effectively collapsed on 15 August 2021, when Taliban forces entered Kabul, and Afghan President Ashraf Ghani fled the country.