Landi Kotal was the westernmost part of the Khyber held by the British during their rule of the Indian subcontinent. In 1897 the Afridis attacked Landi Kotal and other posts in the Khyber Pass. Although the Khyber Rifles put up a stiff defence, Landi Kotal was overrun, as the Rifles lacked water. The British counter-attacked with a force of 34,500 men under Sir William Lockhart, defeating the Afridis, although the Afridis took the town again during the second Anglo-Afghan War.