Type XXI submarines were a class of German diesel–electric Elektroboot (German: "electric boat") submarines designed during the Second World War. One hundred and eighteen were completed, with four being combat-ready. During the war only two were put into active service and went on patrols, but these were not used in combat. They were the first submarines designed to operate primarily submerged, rather than spending most of their time as surface ships that could submerge for brief periods as a means of escaping detection. They incorporated many batteries to increase the time they could spend submerged, to as much as several days, and they only needed to surface to periscope depth for recharging via a snorkel.