The harbour defence companies was responsible for local defence and for the security of the ships and submarines moored in the harbour . These companies and the harbour defence boats used to patrol the river was under the command of Harbour Commander Korvettenkapitän Kellerman . The 333rd Infantry Division was the German Army unit responsible for the defence of the coast between St Nazaire and Lorient . The division had no troops based in the town , but some was located in villages nearby and would be able to respond to any attack on the port .