Six inmates from the last island penal colony in the Americas were recaptured at sea after using buoyant containers and planks of wood in an attempt to float and swim to freedom.

The Mexican navy said the inmates used empty plastic gas or water tanks to help them stay afloat as they swam about 60 miles south of the Islas Marias, a Mexican penal colony in which prisoners live in small houses and are normally not locked up. Inmates are allowed to tend small gardens and grow food.

The six men were around 58 miles off the Pacific coast resort of Puerto Vallarta when they were seen by people on a passing boat early on Thursday.

The local naval base was contacted and patrol boats were dispatched to take the men into custody. Photos provided by the navy showed them on the deck of a patrol vessel.

The escaped prisoners, who ranged in age from 28 to 39, were taken back to Puerto Vallarta for medical checks before being handed back to the prison authorities.

The interior department, which is in charge of Mexico's prisons, said the men had been found to be in "acceptable" health and would be returned to the penal colony "within hours".

The department said the prison oversight agency had only been notified that the men were missing from the prison on Thursday – the day they were found – suggesting their absence had not been noticed when they set off.

The Islas Marias penal colony lies about 70 miles from the mainland, but the prisoners did not swim to the closest shore, which is due east. Instead, they apparently swam south, either because prevailing currents carried them that way, because they did not know where they were going, or because they were aiming for Vallarta.

The Pacific forms the main security barrier at the island. While dozens of prisoners are believed to have tried to escape since the colony was founded in 1905, local media reports indicate that few, if any, made it to the mainland.

The escape bid drew comparisons with the film Papillon, in which the main character, played by Steve McQueen, uses a buoyancy device to swim away from a penal colony in French Guyana.