The stand-off between officials and asylum seekers onboard a tanker at the Indonesian port of Merak has ended after all 120 of those onboard were brought ashore, the ABC reports.
The Afghan asylum seekers, who were originally bound for Christmas Island, were rescued on Sunday after their boat broke down and started taking on water.
They refused to leave the boat that rescued them, but after talking to Indonesian immigration officials, the UN refugee agency and the International Organisation for Migration, they won a guarantee that none of them would be sent to immigration detention centres.
Many of the asylum seekers were sceptical and there were angry scenes on deck while they argued and struggled with police.
Indonesian officials say they will be housed in a hotel while their claims are processed.
Armed members of the counter-terrorism unit were standing by on the dock as the asylum seekers boarded two buses and were driven away.
Four asylum seekers left the ship earlier on Tuesday for negotiations, and while they were away their fellow passengers told the ABC they feared being held in Indonesian detention centres while their claims were assessed.