The Battle of Cocos was a single-ship action that occurred on 9 November 1914, after the Australian light cruiser HMAS Sydney responded to an attack on a communications station at Direction Island by the German light cruiser SMS Emden.
After the retreat of the German East Asia Squadron from Southeast Asia, Emden remained behind to function as a commerce raider. During a two-month period, the German cruiser captured or sank 25 civilian vessels, shelled Madras, and destroyed two Allied warships at Penang. In early November, von Müller decided to attack the communications station at Direction Island, in the Cocos Islands, to hamper Allied communications and frustrate the search for his ship. Around the same time, a convoy of Europe-bound transports carrying Australian and New Zealand soldiers departed from Albany, Western Australia, with HMAS Melbourne, HMAS Sydney, HMS Minotaur, and Japanese battlecruiser Ibuki escorting.
During the night of 8–9 November, Emden reached the islands, and sent a party ashore at around 06:00 to disable the wireless and cable transmission station on Direction Island. The station was able to transmit a distress call before it was shut down.