On 14 May, the three ships set out for the Mediterranean as additional escorts for the Convoy KMS 51, which had departed Liverpool, the previous day. "Attacker" detached from the convoy on 19 May, and put into Gibraltar, 24 May. On 2 June, she moved from her berth on the North Mole to the inside of the Detached Mole, where on the night of 4 June, while silhouetted behind the mole, an enemy submarine launched a torpedo at her. The torpedo detonated on the outside of the mole which caused to serious damage to "Attacker". On June 6, she and "Hunter" sailed for Mers El Kébir, providing air cover for Convoy KMS 52.