In October 1942, "Duke of York" was involved in the Allied invasion of North Africa, but saw little action as her role only required her to protect the accompanying aircraft carriers. "Duke of York" stopped the Portuguese vessel "Gil Eannes" on 1 November 1942 and a commando arrested Gastão de Freitas Ferraz. The British had picked up radio traffic indicating naval espionage, possibly compromising the secrecy of the upcoming Operation Torch.