A nuclear-powered submarine almost collided with a ferry carrying more than 200 passengers to Belfast to Cairnryan.
The two vessels came within 50-100 metres of each other in the incident on November 6, 2018, a Marine Accident Investigation Branch (MAIB) report found.
Crew on the Stena Superfast VII ferry "took immediate action to avoid collision" after spotting the submarine's periscope nearby.
Ferry passengers and the crew on both vessels were placed "in immediate danger" the report found.
The nuclear-powered submarine, based at Faslane, was patrolling an area south of the ferry route when it came close to the Stena vessel, which had 215 passengers and 67 crew on board.
The report said: "This incident happened because the submarine's control room team overestimated the ferry's range and underestimated its speed.
"This combination meant that the submarine's commanding officer and its officer of the watch made safety-critical decisions that might have appeared rational to them at the time but were actually based on inaccurate information."
The report found that when the submarine's control room team initially detected Stena Superfast VII visually, they estimated it to be at a range of 9,000-10,000 yards.
At a speed of 21 knots, Stena Superfast VII would cover 6,000 yards in eight minutes and 34 seconds, which was an estimate of the time available for the submarine's officer of the watch (OOW) to take avoiding action.
However, the report found the OOW had estimated the ferry's speed as 15 knots, so would have "incorrectly calculated" it would take the ferry 12 minutes to travel 6,000 yards and "almost certainly assessed that there was significantly more time to take avoiding action than was actually the case".
Following the incident, the master of the ferry notified the coastguard, saying the submarine's periscope had passed down the starboard side of the vessel at a range of 50-100 metres.
The report said: "During safety training in the North Channel, the command team of a submerged submarine did not take sufficient action to prevent the ferry, Stena Superfast VII, passing inside its go-deep range.
"This was an unsafe event and placed the ferry's passengers and crew, as well as the submarine and its crew, in immediate danger."
It said the ferry's OOW showed "great presence of mind and strong conviction" in altering course to port to avoid a collision, and warned that "without this alteration, there was a serious risk of collision".
Andrew Moll, chief inspector at the MAIB, said: "I have today recommended that the Royal Navy undertakes an independent review of the actions that have been taken in order to ensure that the risk of similar collisions has been reduced to as low as possible."
A Royal Navy spokesman said: "Ensuring safety at sea is a top priority for the Royal Navy, which is why we welcome this report and have already taken action to tighten our training and procedures."
The Royal Navy said there were no nuclear safety issues during the incident.