A new, Spanish-designed submarine has a weighty problem: The vessel is more than 70 tons too heavy, and officials fear if it goes out to sea, it will not be able to surface.

And a former Spanish official said the problem can be traced to a miscalculation — someone apparently put a decimal point in the wrong place.

“It was a fatal mistake,” said Rafael Bardaji, who until recently was director of the Office of Strategic Assessment at Spain’s Defense Ministry.

The Isaac Peral, the first in a new class of diesel-electric submarines, was nearly completed when engineers discovered the problem. A U.S. Navy contractor in Connecticut, Electric Boat, has signed a deal to help the Spanish Defense Ministry find ways to slim down the 2,200-ton submarine.

The agreement with Electric Boat calls for Spain to pay $14 million over three years for an assessment of the problem with the S-80 submarine program and the scope of the work that would be required to correct it, the Spanish Defense Ministry said in a statement.

Bardaji, now a senior fellow with the Strategic Studies Group think tank in Madrid, said officials will review options provided by Electric Boat. But he said the preference has been to extend the length of the submarine’s hull, perhaps by 16 to 19 feet, to increase buoyancy.

Otherwise, the weight of the submarine would have to be reduced, and he said the Spanish Navy would not want to compromise features such as the combat system or an air-independent propulsion system.

The Isaac Peral, named for a 19th century Spanish submarine designer, is one of four vessels in the class that are in various stages of construction. The country has invested about $2.7 billion in the program. The first was scheduled to be delivered in 2015 but the Spanish state-owned shipbuilder, Navantia, has said the weight problems could cause delays of up to two years.

The 233-foot-long submarine will carry a crew of 32, along with eight special forces troops, and weapons systems for surface and anti-submarine warfare.

The Defense Ministry said technical problems are normal for projects of this scale.

“The technology challenges that these programs face during development are much more than simple calculations,” the ministry said. “All the major military programs, especially submarines, have experienced delays and often have required the support of a technology partner.”

Bardaji said the problem was discovered in the second half of last year, and Navantia told defense officials that somebody had apparently put a decimal point in the wrong place.

“Apparently somebody in the calculations made a mistake in the very beginning and nobody paid attention to review the calculations,” he said.

Electric Boat, the primary contractor for the U.S. Navy’s fleet of nuclear submarines, accepted the contract through a foreign military sales agreement between the American Navy and the Spanish Defense Ministry, the U.S. Naval Sea Systems Command announced this week.

A division of General Dynamic Corp., Electric Boat has helped other countries with their submarine programs. It began assisting with development of the Astute-class nuclear attack submarine for the British Royal Navy in 2003, and it is working under another foreign military sales agreement on Australia’s Collins class of submarines.