During the first half of the century several castles were maintained, or brought back into military use. During the Irish War of Independence Dublin Castle remained the centre of the British administration, military and intelligence operations in Ireland until the transfer of power and the castle to the Irish Free State in 1922. During the Second World War the Tower of London was used to hold and execute suspected spies, and was used to briefly detain Rudolf Hess, Adolf Hitler's deputy, in 1941. Edinburgh Castle was used as a prisoner of war facility, while Windsor Castle was stripped of more delicate royal treasures and used to guard the British royal family from the dangers of the Blitz. Some coastal castles were used to support naval operations: Dover Castle's medieval fortifications used as basis for defences across the Dover Strait; Pitreavie Castle in Scotland was used to support the Royal Navy; and Carrickfergus Castle in Ireland was used as a coastal defence base. Some castles, such as Cambridge and Pevensey, were brought into local defence plans in case of a German invasion. A handful of these castles retained a military role after the war; Dover was used as a nuclear war command centre into the 1950s, while Pitreavie was used by NATO until the turn of the 21st century.