A number of the seven U.S. Navy sailors missing after a collision between a destroyer and a container ship have been found dead, the 7th Fleet said Sunday.

The sailors were found in the berthing compartments of the USS Fitzgerald, which flooded after the collision in the early hours of Saturday morning. The container ship appeared to have struck a glancing blow to the Aegis-class guided-missile destroyer, severely damaging the berthing compartments where the sailors were sleeping.

A spokesman for the 7th Fleet would not immediately confirm whether the bodies of all seven missing sailors had been found or just some of them.

They were found after the Fitzgerald returned to its home port at Yokosuka on Saturday night and search and rescue crews were able to enter the ship.

The sailors’ bodies have been taken to the naval hospital on the Yokosuka base to be identified. Their names will not be released until their families have been notified, the 7th Fleet said in a statement.

Civilian and military investigators tried to figure out how the nighttime collision between two vessels — both with advanced navigation systems — could have occurred.

“This has been a difficult day,” Vice Adm. Joseph P. Aucoin, the commander of the 7th Fleet, said as the badly damaged Fitzgerald limped back into its home port at Yokosuka Naval Base, south of Tokyo, after emergency efforts at sea to control flooding and before the deaths were announced.

Family members of the missing were waiting on the pier with Aucoin when it arrived, guided by two tug boats. The 7th Fleet had set up an information center for the families, and had chaplains and a counselor on site.

The Fitzgerald collided with the Philippine-flagged Crystal, nearly four times its size, in a busy shipping lane south of Tokyo at 2:30 a.m. local time Saturday. The weather was clear with a swell of about six feet at the time.

Three of the Fitzgerald’s crew, including the destroyer’s commanding officer, Cmdr. Bryce Benson, were evacuated from the damaged vessel and are being treated at the U.S. naval hospital at Yokosuka, the home of the U.S. Navy’s 7th Fleet.

Benson was reported to be in stable condition, while the other two were treated for lacerations and bruises.

All three were awake and being kept under observation in hospital, the 7th Fleet said in a statement.

The Fitzgerald, an Arleigh Burke-class destroyer commissioned in 1995, is part of the Yokosuka-based group that includes the aircraft carrier USS Ronald Reagan, but it was operating independently of the carrier when the collision occurred, said Cmdr. Ron Flanders, public affairs officer for U.S. Naval Forces Japan.

When its crew is at full strength, the Fitzgerald usually has more than 250 personnel aboard and can reach speeds in excess of 30 knots.

The operators of the merchant ship, ACX Crystal, reported all of the 20-member Filipino crew were safe.

The Crystal, which was fully loaded with cargo, is bound for Tokyo, according to a website that tracks maritime traffic. It is operated by Nippon Yusen K.K., a Japanese shipping company, and was on its way from Nagoya port at the time of the collision.

“We are collaborating with the ship owner and fully cooperating with the investigation by the coast guard,” Nippon Yusen said in a statement.

All 20 Filipino crew members aboard the ship are safe and it has set up a task force to deal with the accident, the company said, according to the Kyodo News Agency.

Photos showed the container ship with minor damage to its bow, while the Fitzgerald appeared to have extensive damage midship on its right, or starboard, side, just below its bridge.

The destroyer was listing slightly, with water visibly being pumped, as it was towed into harbor.

Divers were waiting to inspect it below the waterline, where there had also been significant damage.

The collision had caused flooding in two berthing spaces, a machinery space and the radio room, the 7th Fleet said.

“Thoughts and prayers with the sailors of USS Fitzgerald and their families,” President Trump wrote in a Twitter message Saturday. “Thank you to our Japanese allies for their assistance.”

The USS Dewey, another Navy destroyer, was helping with the search and rescue operations, along with three Japanese naval ships and two Japanese coast guard vessels.

An American P-8 Poseidon aircraft was joined overhead by Japanese helicopters and an Orion aircraft.

There are extensive international guidelines for accident avoidance at sea known as the International Regulations for Preventing Collisions at Sea, or Colregs.

The rules require that ships must have a watch posted at all times and follow a number of collision-avoidance steps when crossing paths with or overtaking other vessels.

Thomas Gibbons-Neff in Washington contributed to this report.