A former officer in the Royal Navy indecently assaulted a junior member of crew while serving as second in command of a naval ship, and was moved to another vessel after the younger man complained about his behaviour, a court has heard.
Charles Howeson, 67, denies sexual offences against nine young men in the 1980s and 1990s.
The former officer, who also spent time working for a charity, is currently on trial at Bristol Crown Court.
The court heard he was lieutenant commander on HMS Cleopatra when he allegedly groped one of the crew.
Paul Dunkels, QC, acting for the prosecution, said the man was walking up to the boat deck when Howeson put his arm around his shoulder and rubbed his genital area.
During his opening of the case, Mr Dunkels said the crew member "immediately" reported the incident and it was apparent to those who saw him that he was "shaken by the experience".
The court heard a second man on the ship reported Howeson for touching his stomach and tugging at his shirt.
These allegations are not part of the charges but would be heard by the jury as supporting evidence.
Mr Dunkels said the incidents were investigated by the Royal Navy special investigations squad but Howeson denied any suggestion of sexual conduct and was given a warning as to his future behaviour.
The Prosecutor said:
"The defendant was transferred to another ship."
"The official explanation being that he was unwell."
The court heard Howeson was accused of a series of indecent assaults against six young men during his time as executive director of a Plymouth charity in the 1990s.
Mr Dunkels said those men also complained about the defendant's behaviour at the time, but the allegations were "swept under the carpet" and they were told negative publicity would destroy the charity.
The court heard Howeson resigned for health reasons five days after the complaints were received.
Mr Dunkels said:
"In the 1980s and the 1990s the attitude of the establishment towards allegations of sexual misconduct was one of reluctance to accept that something may be wrong, and unwillingness to pursue such matters with the vigour they deserved."
Offences against two other men, including the attempted buggery of a teenager, are alleged to have taken place while Howeson lived at a house in Plymouth in the late 1980s.
Mr Dunkels said Howeson was in a powerful position in comparison to those who were complaining about his behaviour.
"In each situation, he was in a dominant position to the young men that he touched whether by his rank in the Royal Navy, his age compared to that of the young boys or his position" in the charity, he said.
Jurors were told they would hear evidence from the nine men, some of whom complained about Howeson 25 to 30 years ago and some who came forward after his arrest in 2016 was published in local newspapers.
Howeson, of Craigie Drive, Plymouth, denies 11 counts of indecent assault and one of attempted buggery.
The charges relate to nine males and are alleged to have taken place on dates between December 1985 and August 1994.
Mr Dunkels said the trial was about Howeson's sexual behaviour which "at its most extreme involved an attempt to bugger a teenage boy".
"Much of the rest of the defendant's behaviour was touching the penis and testicles of his victims, usually over their clothes, sometimes over their clothing," he said.
"It could be described as groping, testing the extent to which those he was touching were prepared to go along with that sort of behaviour."
Mr Dunkels said Howeson was a man who was "successful in his careers both in and after the Royal Navy", a man who had much to lose if the allegations against him were prosecuted but who was confident "that he was unassailable" because of his position.
The trial continues.