BANGKOK — The remains of all 10 United States Navy sailors who died aboard the destroyer John S. McCain in a collision near Singapore a week ago have been recovered, the Navy announced on Monday.

Ships and aircraft from five nations had launched a huge search at sea after the McCain’s pre-dawn collision with an oil tanker east of Singapore on Aug. 21. But the bodies of the 10 men were recovered in the destroyer’s crushed and flooded compartments.

The interior of the destroyer was so heavily damaged that it took days to locate the bodies.

At least 20 divers from the Navy and the United States Marine Corps were involved in the recovery effort and used hydraulic cutters and other equipment to gain access to the compartments where the men died.

They were able to reach the area by entering the ship through the hole in its port side that was left by the collision.