The ship returned to Atlantic escort duties in 1941, during which time she prevented the two s from attacking a convoy; she also joined the search for the battleship . In late 1941, "Ramillies" was transferred to the Eastern Fleet as tensions with Japan rose; the following year, she was the flagship for the invasion of Madagascar. While moored there, she was torpedoed and badly damaged by Japanese midget submarines. The ship was updated for coastal bombardment duties in 1944, which she performed later that year during the Normandy landings in June and the invasion of southern France in August. In January 1945, the worn-out battleship was withdrawn from service and used as a barracks ship attached to the training establishment . She was ultimately broken up in 1948.