The Austro-Hungarian Navy or Imperial and Royal War Navy (, in short k.u.k. Kriegsmarine, ) was the naval force of Austria-Hungary. Ships of the Austro-Hungarian Navy were designated SMS, for Seiner Majestät Schiff (His Majesty's Ship). The k.u.k. Kriegsmarine came into being after the formation of Austria-Hungary in 1867, and ceased to exist in 1918 upon the Empire's defeat and subsequent collapse at the end of World War I. Prior to 1867, the Imperial Austrian Navy or simply the Austrian Navy, saw action in the French Revolutionary Wars, the Napoleonic Wars, the Austrian expedition against Morocco (1829), the Second Egyptian–Ottoman War, the First and Second Wars of Italian Independence, the Second Schleswig War, and the Third War of Italian Independence. Following Austria's defeat by Prussia and Italy during the Seven Weeks' War, the Austrian Empire reformed itself into the dual monarchy of Austria-Hungary, and the navy also became the Austro-Hungarian Navy. Largely neglected by the Empire in its early years, the k.u.k. Kriegsmarine expanded along with Austro-Hungarian industrialization into one of the largest navies in the Adriatic and Mediterranean Seas. By 1914, the k.u.k. Kriegsmarine had a peacetime strength of 20,000 personnel, seeing action in the Boxer Rebellion and other conflicts prior to World War I. During most of World War I, the Allied Powers maintained the Otranto Barrage to bottle up the k.u.k. Kriegsmarine in the Adriatic Sea. Largely tasked with defending the Empire's of coastline and of island seaboard, the Navy chose to rely on its U-boats to attack Allied shipping rather than risk the destruction of its battleships, cruisers and other surface vessels. In June 1918, it attempted to break the Otranto Barrage with a large naval fleet, but the attack was called off after the battleship was sunk by an Italian torpedo boat on 10 June. Five months later, with the Austro-Hungarian Empire facing collapse and defeat in the war, the Empire decided to transfer most of its navy to the newly declared State of Slovenes, Croats and Serbs on 31 October, effectively bringing the k.u.k. Kriegsmarine to an end. Three days later, the Empire's military authorities signed the Armistice of Villa Giusti, pulling the rapidly disintegrating empire out of the war. With the signing of the Treaty of Saint-Germain-en-Laye and the Treaty of Trianon, Austria and Hungary became landlocked, and the Empire's most important ports of Trieste, Pola, Fiume and Ragusa became part of Italy