The offending videos, shown in 2007 and since released by a newspaper, feature Captain Owen Honors using gay slurs, miming masturbation and staging suggestive shower scenes. They were played on the shipwide television system during weekly movie night when Capt Honors was executive officer, or second in command, of the 'Enterprise'. Capt Honors had since become commander of the ship.

The commander of US Fleet Forces, Admiral John C Harvey, said Capt Honors showed "extremely poor judgment" in the videos. Capt Honors was switched to an administrative role.

Over the weekend, the Navy at first downplayed the videos as "humorous skits" then called them "not acceptable" and said they were under investigation.

Naval officials last night said the Navy has chosen a commander to replace Capt Honors on the nuclear-powered ship, currently stationed in Norfolk and scheduled to deploy to the Middle East this month.

The offending video became public last weekend, proving a major embarrassment to the Pentagon.

But the videos' existence was not news to Navy higher-ups.

In a statement on Friday, the Navy said its leadership had put a stop to videos with "inappropriate content" on the 'Enterprise' about four years ago.

Michael Corgan, a career Navy officer, said Capt Honors was guilty not only of an error in judgment but of failing to recognise a changing Navy culture.

"Standards shift, of course, and trimming your sails is something you have to do if you're going to command people in the Navy," Mr Corgan said.

"This guy showed poor judgment."

The military has undergone a cultural shift in recent decades away from the loutish, frat-boy behaviour that was exposed by the Tailhook scandal in 1991.

It is now working to accommodate gays in its ranks with Congress's repeal of "don't ask, don't tell."

Also, the Navy is opening its all-male submarine force to women this year.

"What he did would have been dumb 30, 40 years ago," Mr Corgan added.

Morale

Some sailors who served on the 'Enterprise' have taken to Facebook to defend Capt Honors and his video skits for providing a much-needed morale boost during long deployments out at sea.

They portrayed Capt Honors as a man who genuinely cared about his sailors and helped them blow off steam with corny and occasionally outrageous videos he concocted every week during six-month tours of duty in the Middle East at the height of the Iraq War.

Maintaining morale is typically part of the XO's job.

"He was a caring professional and, yes, he has a sense of humour, but you need that on a boat," said Misty Davis, who served on the 'Enterprise' from 2006 to 2010.

"It's no worse than anything you'd see on 'Saturday Night Live' or 'The Family Guy'," Davis said.