The Spanish Navy ordered four S-80 diesel electric attack submarines in 2003, to replace the aging, Cold War-era Agosta class. The new, fully modern submarines were designed with air independent propulsion, allowing them to stay underwater longer than other diesel electric submarines. The S-80s are armed with six 533-millimeter torpedo tubes capable of launching German DM2A4 Seahake guided torpedoes, American Harpoon anti-ship missiles, and Tomahawk land attack cruise missiles.
The S-80 was saddled with problems from the start. Spain’s economy took a severe downturn during the late 2000s, and the country’s defense budget was put under strain. In 2013, ten years after the first boat was ordered, authorities detected a critical flaw in the design: The submarines were 75 to 100 tons heavier than anticipated.
The submarines could dive but there was some question as to whether they could reliably surface again. According to the BBC quoting the Associated Press, the problem was the result of someone involved in the design process placing a decimal point in the wrong place. The problem was not discovered until the ships were under construction.