On 21th June 1919, after the end of the World War I, and one week before the Treaty of Versailles, admiral Ludwig von Reuter gave the order to the complete German fleet, which had been arrested by the British Royal Fleet, to destroy itself at Scapa Flow near the Orkney Islands. All 72 ships followed this order. The main reason for this was the old codex, not to give any ship to the enemy. This event destroyed the second largest fleet of this time. The history of the German fleet started only round about 30 years early, as the Deutsche Reich thought, that a strong fleet was important, to win a European war. Ironically the fleet was nearly unused during the World War.

While the motives of the German admiral are pretty obvious, it is not certain, why the British, although able to, did not try to prevent the self destruction. One often heard argument is, that, after the Treaty of Versailles the German fleet should be distributed among the Allied Forces. This would have meant a strengthen of for example France's fleet, which was nearly not existing at this time. So the British weren't that unhappy with the destruction. Other reasons maybe the respect of the British fleet for the codex or they just have been so surprised, that they were unable to react.
Clearly this event contributed to the myth of the undefeated Wehrmacht, being murdered by its own government ( the so called Dolchstoßlegende), leading to a large aversion against the new democratic government in Germany, its soon abolishment and the Machtergreifung by Adolf Hitler.