In August 1940, "Ajax" was allocated to the 7th Cruiser Squadron for Mediterranean service (France had fallen and Italy was now a belligerent with a significant navy). She sailed from Britain on 21 August as part of the escort (with ), to a convoy for Egypt routed via the Mediterranean (Operation Hats), but she remained with a portion that was diverted via Durban. In late September, she escorted a troop convoy (, and ) from Aden to Suez. "Ajax" joined at Alexandria on 30 September.