Throughout most of European history, Germany's naval prowess had always been eclipsed by its British, French, Dutch and Spanish neighbors. A unified Germany only came into being in the late 19th century, thus it did not play a major role in the European colonial period; while its inherited coastline (largely from the Kingdom of Prussia) was relatively long, Germany's geographical location at the center of the European continent meant that greater preference was given to its army and its navy never went beyond being a coastal defense force. Beginning in the late 19th century, Kaiser Wilhelm II pursued a policy of naval strengthening, believing that a powerful navy was the key to power on the world stage and possibly also wishing to compete with his cousin, King George V of Britain. While the meteoric rise of the Imperial German Navy caught the attention of Europe and brought about a costly naval arms race, it was never able to out-build and out-innovate the Royal Navy, who responded with powerful and revolutionary designs such as HMS Dreadnought and the Queen Elizabeth-class battleships. Nevertheless, the Imperial German Navy was a formidable force in World War I, being the first navy in the world to display the crippling effectiveness of submarines (despite technological limitations) against unescorted merchant shipping and slow, sluggish warships.
After her defeat, Germany once again set about attempting to challenge the Royal Navy with "Plan Z", but the earlier-than-expected outbreak of World War II meant that it could not be fully implemented, leaving her navy — now known as the Kriegsmarine — severely under-equipped to go toe-to-toe with the Royal Navy. This caused her surface fleet to be mostly relegated to operations support (such as Operation Weserübung, the invasion of Norway and Denmark) and commerce raiding. However, the Kriegsmarine had powerful (but very few) battleships and battlecruisers, scoring victories in sinking HMS Hood and HMS Glorious and putting up valiant, stubborn resistance — a testament to the crews' tenacity — until the superior numbers of British forces wore them down. As in World War I, more feared than her surface combatants were her fleet of U-boats; the largest, most powerful in the world and under the command of Grand Admiral Karl Dönitz — an experienced submariner himself who was instrumental in the buildup of the U-boat fleet after the scrapping of "Plan Z" — they wreaked havoc on British and American fleets and supply lines, sinking 14 million tons of shipping and more enemy warships than any other class throughout the war. Eventually, mounting losses inflicted by the Royal Navy resulted in the Kriegsmarine's surrender along with Germany on 8 May 1945, Victory in Europe (V-E) Day.