Answer
Beatty served in the Mahdist War, a conflict in Sudan between 1881 and 1899, before World War I. The Mahdist forces, led by Muhammad Ahmad, sought to establish an Islamic state and resisted British control. Beatty's participation in this war provided valuable experience and prepared him for his future leadership role in the Royal Navy during World War I.