The commanding officer of the destroyer Fitzgerald has been temporarily relieved of command so he can recover from the injuries he sustained when his ship collided with a container ship last month, Navy officials said Tuesday.

Cmdr. Bryce Benson was reportedly trapped in his quarters after the Fitzgerald collided with the hulking ACX Crystal cargo vessel off the Japanese coast in the early hours of June 17.

The collision ripped a massive gash in the destroyer and killed seven sailors, who were later found dead in the ship's berthing area.

Navy officials stressed Benson's temporary relief was conducted to give Benson time to recover.

"We're focused on supporting Cmdr. Benson -- getting him the resources he needs -- during the recovery process," 7th Fleet spokesman Cmdr. Clay Doss said in an email.

Cmdr. John Fay, currently assigned to Commander, Task Force 70 staff, will assume command of the Fitzgerald, which was slated to go into dry dock Tuesday as investigators continue to assess what happened and prospects for repairing the destroyer.

Several investigations into the fatal mishap continue.

Sources told Defense News last month that there was no indication a collision alarm sounded before the Crystal collided with the Fitzgerald's starboard side. Such an alarm would have alerted sleeping sailors.

Sailors had about a minute to evacuate their berthing, and several were awoken to sea water flooding their rack, two sources with knowledge of the accident told Defense News.

Benson reported as the Fitzgerald's executive officer in November 2015, and assumed command of the destroyer in May.