TUAL, Indonesia — More than 300 migrant fishermen who had been enslaved on trawlers for years rode those same vessels to freedom on Saturday after a daring rescue from a remote Indonesian island where they had lived in fear of being beaten or killed by their captors.

After 17 hours overnight at sea, the men, mostly from Myanmar, filed off the boats and walked to the site of their new temporary home where they were finally safe.

The men from Myanmar, along with others from Cambodia, Laos and Thailand, were among hundreds of migrant workers who had been lured or tricked into getting on boats bound for Indonesia, according to an Associated Press investigation.

After they arrived on the Indonesian islands, they were forced by trawler captains to catch seafood that was shipped back to Thailand and exported to buyers around the world, including the United States.