The S-class submarines of the Royal Navy were originally designed and built during the modernisation of the submarine force in the early 1930s to meet the need for smaller boats to patrol the restricted waters of the North Sea and the Mediterranean Sea, replacing the British H-class submarines. As part of the major naval construction for the Royal Navy during the Second World War, the S class became the single largest group of submarines ever built for the Royal Navy. A total of 62 were constructed over a period of 15 years, with fifty of the "improved" S class being launched between 1940 and 1945.