WASHINGTON — The two top officers aboard a destroyer during a deadly collision off the coast of Japan in June were relieved of their duties on Friday, the Navy’s Seventh Fleet said. A number of other sailors were punished for their roles in the crash.

The announcement followed the release of a harrowing preliminary report on the collision between the destroyer Fitzgerald and a freighter that killed seven people aboard the American ship. It was one of the Navy’s deadliest accidents in years.

The ship’s captain, Cmdr. Bryce Benson; his second-in-command; and the senior enlisted sailor were relieved of their duties by the head of the Seventh Fleet in Japan, Vice Adm. Joseph P. Aucoin. A statement from the fleet said “inadequate leadership” had contributed to the collision.

The statement said a number of other sailors would face disciplinary action. A senior Navy officer said Thursday that about a dozen sailors in total would be punished, including all those on watch the night of June 17.