The S-class or Srednyaya (Средняя, "medium") submarines were part of the Soviet Navy's underwater fleet during World War II. Unofficially nicknamed Stalinets (Сталинец, "follower of Stalin"; not to be confused with the submarine L-class L-2 Stalinets of 1931), boats of this class were the most successful and achieved the most significant victories among all Soviet submarines. In all, they sank of merchant shipping and seven warships, which accounts for about one-third of all tonnage sunk by Soviet submarines during the war.
The history of the S class represents a turn in warship development. It was a result of international collaboration between Soviet and German engineers that resulted in two different (but nevertheless related) classes of submarines often pitted against each other in the war.
In the early 1930s the Soviet government started a massive program of general rearmament, including naval expansion. Submarines were one key point of this program, but currently available types did not completely satisfy naval authorities. The recently developed was satisfactory, but it was designed specifically for shallow Baltic Sea service and lacked true ocean-going capabilities. The larger boats of the Soviet Navy were quickly becoming obsolete.
As a result, the government commissioned several engineers to search for a suitable design for a medium-sized ocean-going submarine, and this search soon brought success. After its defeat in World War I, the German Weimar Republic was forbidden under the terms of the Treaty of Versailles to have submarines or build them in its own yards. Germany circumvented this restriction by creating various subsidiaries of their shipbuilding and design companies in third countries. One of these proxies, the Netherlands-based NV Ingenieurskantoor voor Scheepsbouw (IvS), a subsidiary of Deutsche Schiff- und Maschinenbau AG-AG Weser, was developing a submarine that matched Soviet requirements. The Spanish government, during General Primo de Rivera's dictatorship, showed interest in obtaining such a submarine for the Spanish Navy.