With the danger of invasion after the British Expeditionary Force was evacuated from Dunkirk, the coastal artillery regiments underwent a major reorganisation in the summer of 1940. On 1 July the Dorsetshire Heavy Regiment was redesignated 522nd (Dorsetshire) Coast Regiment and reorganised as six batteries, designated A to F. A number of emergency batteries of ex-Royal Navy guns were obtained for the South Coast ports, including two 6-inch Mk XII naval guns manned by the army, ordered for Poole Harbour on 22 May. These were followed by two 4.7-inch guns ordered for Lyme Regis on 14 July. Other emergency coastal batteries (each of two 4-inch Mk VII guns) were ordered on 21 July for Abbotsbury and Swanage. On 31 December 387 Coast Bty at Abbotsbury was incorporated into the regiment.