Russia had recently undergone its Communist revolution, leading to strained relations between the country and the United Kingdom. Amanullah Khan recognized the opportunity to use the situation to gain Afghanistan's independence over its foreign affairs. He led a surprise attack against the British in India on 3 May 1919, beginning the Third Anglo-Afghan war. After initial successes, the war quickly became a stalemate as the United Kingdom was still dealing with the costs of World War I. An armistice was reached towards end of 1919, and Afghanistan was completely free of British diplomatic influence.