Leaders of the British Empire generally believed that Russia had plans to move southward and seize Britain's prize possession, India, which was known as The Raj. And the British invaded Afghanistan twice in the 1800s to prevent Russian encroachment in Afghanistan and any threat to British dominance in the region.
The First Anglo-Afghan War was fought in 1841-42, and ended with the disastrous retreat from Kabul in 1842, in which only one British soldier survived.
The Second Anglo-Afghan War was fought in 1878-80.
The phrase "The Great Game" was first used to describe the confrontations in southern and central Asia in the early 1840s. The term was popularized by Rudyard Kipling in the novel Kim, which first appeared in serial form in 1900.