Southampton Magistrates' Court heard how skipper Roland Wilson's Atalanta of Chester racing yacht hit the 260-metre Hanne Knutsen during Cowes Week during August 2011. He denies three counts of contravening maritime regulations.
The court has heard that Royal Navy Reserves lieutenant Mr Wilson, 32, of Stanley, Perthshire, sailed "perilously" close to the 120,000-ton vessel despite seeing it from five miles away. Retired Navy commander Michael Shrives, who was navigating, told the trial it came after the yacht came to a sudden stop after losing the wind.
He expected to pass port-to-port with the Hanne Knutsen as it had given a short blast of its horn indicating it would turn to the starboard, a turn he said it did not make, the court heard.
The trial has heard the tanker changed course to avoid a stranded motor vessel.
Mr Shrives said: "It was almost like rabbits in the headlights at that stage, it was too late to do anything.
"There was a false expectation that the tanker would take a track that it subsequently didn't as we have seen these big ships coming through that area. We thought the Hanne Knutsen would follow the patrol boat and would pass a good distance port-to-port and the danger would be through and we would be passing it on our way to our mark."
Simon Lusty, marine officer on the pilot boat Spitfire, which was assisting the Hanne Knutsen with its arrival at Fawley oil refinery, said the Atalanta was spotted ahead of the tanker and the Spitfire approached it to warn the crew.
He said: "I told the skipper at the helm that he needed to start his engines and clear the area, there's a tanker coming down.
"I cannot say it was the helmsman but I had acknowledgement from someone in the cockpit."
The trial continues.