Although Australia was remote from the main battlefronts, there was considerable Axis naval activity in Australian waters during the Second World War. A total of 54 German and Japanese warships and submarines entered Australian waters between 1940 and 1945 and attacked ships, ports and other targets. Among the best-known attacks are the sinking of HMAS Sydney by a German raider in November 1941, the bombing of Darwin by Japanese naval aircraft in February 1942, and the Japanese midget submarine attack on Sydney Harbour in May 1942. In addition, many Allied merchant ships were damaged or sunk off the Australian coast by submarines and mines. Japanese submarines also shelled several Australian ports and submarine-based aircraft flew over several Australian capital cities.
The Axis threat to Australia developed gradually and until 1942 was limited to sporadic attacks by German armed merchantmen. The level of Axis naval activity peaked in the first half of 1942 when Japanese submarines conducted anti-shipping patrols off Australia's coast, and Japanese naval aviation attacked several towns in northern Australia. The Japanese submarine offensive against Australia was renewed in the first half of 1943 but was broken off as the Allies pushed the Japanese onto the defensive. Few Axis naval vessels operated in Australian waters in 1944 and 1945, and those that did had only a limited impact.