The Italian divers had been exploring the cave in Vaavu Atoll on Thursday when they disappeared.
The body of their Italian diving instructor was recovered outside the cave and the Finnish recovery divers brought the bodies of two of the divers to the surface on Tuesday.
The last two bodies were recovered by three Finnish divers supported by the Maldives coastguard and police, presidential spokesman Mohameed Hussain Shareef said.
The bodies were taken to a morgue and identified as Muriel Oddenino and Giorgia Sommacal.
On Tuesday, Monica Montefalcone and Federico Gualtieri were brought out, government spokesperson Ahmed Shaam said.
The instructor, Gianluca Benedetti, was found near the mouth of the cave on the day the divers disappeared.
Montefalcone and Sommacal were mother and daughter.
"After that we will co-ordinate with the Italian government and start the procedure to repatriate the bodies," Shareef said.
He thanked the Finnish divers, praising them for their professionalism and leadership.
The four bodies were found on Monday at a depth of about 60 metres, twice the legal depth for recreational diving in the island nation.
The search had been temporarily suspended after a local military diver died during a perilous retrieval attempt.
The Maldives government said the recovery divers spotted the bodies in the cave's innermost area.
Shaam said the four bodies were found "pretty much together".
The cave had been explored in the past by local experts and foreign divers, presidential spokesperson Shareef told The Associated Press earlier.
While the Italian divers had a permit, authorities did not know from their proposal the exact location of the cave they were exploring, and at least two of the dead were not on the list of researchers who had been submitted, "so we didn't know they were part of the expedition", Shareef said.
He described the conditions deep in the cave as "challenging", with difficult terrain, strong currents and poor visibility.
An alert had also been issued due to bad weather and investigators must determine whether the divers took adequate precautions, Shareef said.
The Divers Alert Network Europe, which deployed the Finnish divers, described them as technical and cave divers with experience in search and recovery missions, including operations in "deep overhead environments, confined spaces and high-risk scenarios".
The cause of death of the Maldivian military diver is still under investigation, but colleagues have suggested he might have died from nitrogen narcosis or decompression at depth.