After assisting the 34th Infantry Division in the attack on Cassino and fighting defensively along the Gari River, the severely depleted 36th withdrew from the line on 12 March, for rest and recreation. The division arrived by sea at the Anzio beachhead on 22 May, under the command of Major General Lucian Truscott's VI Corps, to take part in Operation Diadem, with the breakout from the beachhead commencing the following day. It drove north to capture Velletri on 1 June, and entered Rome on 5 June 1944, the day before the Normandy landings. Pushing up from Rome, the 36th encountered sharp resistance at Magliano, but reached Piombino on 26 June, before moving back to Paestum for rest and recreation. In July Major General Walker, who had commanded the 36th Division since September 1941, was replaced by Major General John E. Dahlquist.