The first submarine built in Germany, the three-man Brandtaucher, sank to the bottom of Kiel harbor on 1 February 1851 during a test dive. The inventor and engineer Wilhelm Bauer had designed this vessel in 1850, and Schweffel & Howaldt constructed it in Kiel. Dredging operations in 1887 rediscovered Brandtaucher; it was later raised and put on historical display in Germany.
There followed in 1890 the boats WW1 and WW2, built to a Nordenfelt design. In 1903 the Friedrich Krupp Germaniawerft dockyard in Kiel completed the first fully functional German-built submarine, Forelle, which Krupp sold to Russia during the Russo-Japanese War in April 1904. The SM U-1 was a completely redesigned Karp-class submarine and only one was built. The Imperial German Navy commissioned it on 14 December 1906. It had a double hull, a Körting kerosene engine, and a single torpedo tube. The 50%-larger SM U-2 (commissioned in 1908) had two torpedo tubes. The U-19 class of 1912–13 saw the first diesel engine installed in a German navy boat. At the start of World War I in 1914, Germany had 48 submarines of 13 classes in service or under construction. During that war the Imperial German Navy used SM U-1 for training. Retired in 1919, it remains on display at the Deutsches Museum in Munich.
On 5 September 1914, HMS Pathfinder was sunk by SM U-21, the first ship to have been sunk by a submarine using a self-propelled torpedo. On 22 September, U-9 sank the obsolete British warships HMS Aboukir, HMS Cressy and HMS Hogue (the "Live Bait Squadron") in a single hour.
In the Gallipoli Campaign in early 1915 in the eastern Mediterranean, German U-boats, notably the U-21, prevented close support of allied troops by 18 pre-Dreadnought battleships by sinking two of them.