Afghan Independence Day is celebrated in Afghanistan on 19 August to commemorate the Anglo-Afghan Treaty of 1919 and relinquishment from protected state status. The treaty granted a complete neutral relation between Afghanistan and Britain. Afghanistan became a British protectorate after they were defeated in the Second Anglo-Afghan War.
The First Anglo-Afghan War (1839–1842) led to the British force taking and occupying Kabul. After this, due to strategic errors by Elphinstone, the entire British-led Indian invasion force was defeated by Afghan forces under Akbar Khan somewhere at the Kabul-Jalalabad Road, near the city of Jalalabad. After this defeat, the British-led forces returned to Afghanistan on a special mission to rescue their prisoners of war (POWs) and afterward withdrew until coming back in order to commence the Second Anglo-Afghan War.
The Second Anglo-Afghan War (1878–80) first led to the British defeat followed by their victory at the Battle of Kandahar, which led to Abdur Rahman Khan becoming the new emir and the start of friendly British-Afghan relations. The British were given control of Afghanistan's foreign affairs in exchange for protection against the Russians and Persians. The Third Anglo-Afghan War in 1919 led the British to give up control of Afghanistan's foreign affairs finally in 1921.