"Guardian" served in the Indian Ocean between 1941 and 1942. She took part in the invasion of Madagascar and helped build a base in the Maldives at Addu Atoll in 1942 in case Ceylon fell into Japanese hands. She also built two more bases for the protection of merchant ships assembling for convoys: one was near Mombasa and the other near Cape Town. "Guardian" then returned to Gibraltar and took part in the invasion of Algeria at Oran (Mers-el-Kebir) in 1942. Afterwards, she returned to Belfast for a refit and the fitting of additional anti-aircraft weaponry. Later, she took part in the invasions of Sicily (Operation Husky) and Italy.