UD-5 was an O 21-class submarine. The boat was laid down as the Dutch submarine K XXVII and renamed O 27 but was captured during the German invasion of the Netherlands in World War II and commissioned in the Kriegsmarine. The ship survived the war and was returned to the Netherlands where she served under her old name until 1959.