Within hours many areas of the 78 metre-submarine had become makeshift sick bays, as 26 crew were taken ill. "We had casualties in the control room, the engine room, the bridge, the wardroom, cabins, and the toilets and showers. It was absolutely terrifying, and I'm not afraid to say I was scared," he said.

The vessel had surfaced and Mr Ramsey was on the bridge when engineers told him the air conditioning plants had "catastrophically" failed. As he went below he was met by an "incredible blast of heat," and the first casualties soon began to be taken ill.

The hunter-killer submarine was only three hours from Fujairah in the United Arab Emirates on May 26, 2011, when the incident took place.

The 44-year-old, who recently retired from the Royal Navy after 25 years' service, said the extreme temperatures left crew "just collapsing everywhere, many at their work stations".

"Walking around the boat I saw true fear in my crew's eyes ... we simply did not know how we were going to get through it."

It was the first time such a malfunction had been reported on a vessel of that type - and the crew did not understand the exact cause of the problem. The heat meant the crew could not reach the problem areas because the equipment was too hot to touch.

A decision was made that it was impossible to return to Fujairah with a "broken" nuclear submarine because of the political fallout. The crew opened two of the hatches to release some of the heat and put some of the casualties outside, but with temperatures on the surface reaching 42 degrees there was little respite. A decision was made to dive to cooler water to reduce the heat.

"It was touch and go before we dived as to what might happen to us and the submarine," Mr Ramsey said. "We couldn't do anything. I could have radioed for help but it would have taken hours for anyone to reach us. In that time people would have died." Diving to below 200 metres, the temperatures began to drop and within 24 hours systems had returned to normal and the crew were recovering.

Mr Ramsey said the problem was later traced to blockages in the submarine's inlet pipes caused by crustaceans.