Gandamak was the last stand of the British East India Company army that retreated from Kabul in 1842 during the First Anglo-Afghan War.