During the Pacific War Japanese submarines occasionally operated off Western Australia. In early 1943 the major Japanese headquarters across the Pacific were directed to use their forces to make small attacks on Allied positions in an attempt to divert attention away from the planned evacuation of Guadalcanal, Operation Ke. In mid-January, the commander of the Japanese Southwest Area Fleet ordered that "I-165" be dispatched to attack Allied shipping off north-western Australia. As part of the fleet's contribution to the diversionary operations, "I-165" was also directed to bombard a coastal Australian town. It is likely that the busy port town of Geraldton was selected for bombardment. The submarine "I-166" was ordered to conduct a similar mission against the Cocos Islands.