WASHINGTON  Navy officials said Monday that it was unclear whether the commander of an aircraft carrier who had produced and appeared in a series of coarse and sexually explicit onboard videos several years ago would deploy with his ship, the Enterprise, when it leaves to support combat missions in Afghanistan this month.

The videos, which include scenes of simulated masturbation, simulated eating of feces and two men as well as two women showering together, were made by Capt. Owen Honors and shown as entertainment to some 6,000 sailors and Marines aboard the Enterprise in 2006 and 2007. The videos, which also include slurs against gay men, were disclosed over the weekend by The Virginian-Pilot of Norfolk, Va.

The Navy said Sunday that the videos were “clearly inappropriate” and that it was investigating the circumstances surrounding their production. The officials said that although the investigation might not be completed before the Enterprise headed to the Arabian Sea from its home port of Norfolk this month, Captain Honors’s superiors could decide to relieve him of command while the inquiry was under way.

Captain Honors, who was the ship’s executive officer and second in command when he made and starred in the videos, declined a request for comment on Monday. He was promoted to the ship’s commanding officer in May.