The United Nations Assistance Mission in Afghanistan (UNAMA) was established in 2002 to help the country recover from decades of war. Until summer 2021, several NATO member states deployed about 17,000 troops in Afghanistan as part of the Resolute Support Mission. Its main purpose was to train the Afghan National Security Forces.