Seafarers who abandoned their ship after being stranded at sea for almost three years say they were forced back to their boat after they were warned they faced jail.

The four men, stranded 25 nautical miles off the coast of the United Arab Emirates, said they were told by coastguards that they faced two years in prison for leaving the vessel, the MV Tamim Aldar, and were advised to return. For abandoned seafarers, leaving a ship is alast resort, as the vessel represents their bargaining power for unpaid wages.

The Federal Transport Authority (FTA) of the UAE said no laws existed to imprison abandoned seafarers and confirmed they would not face arrest in such circumstances.

Vikash Mishra, 34, the ship’s second engineer, said engine failure and lack of fuel had caused dangerous conditions aboard the cargo vessel, forcing the crew to abandon ship.

Mishra, from Mumbai, who told the Guardian he had not been paid for 28 months, said: “The coastguard said: ‘Do you want to go back or do you want to go to jail for two years?’ We told them we had already been in jail in the ship for 33 months.”

In a letter to the FTA, the men said they were “depressed, helpless” and afraid for their lives after being left on the vessel in blackout conditions in a busy shipping lane in the Gulf.

They warned the authorities they were leaving the ship, saying they had no choice. “In complete blackout, the vessel was not safe for our lives,” read the letter, in which the men described the harsh conditions on board, saying they had been forced to sleep outside in searing heat, at the mercy of mosquitoes and cockroaches. The men urged the UAE to “solve our issue and send us home safely”.

The crew of the MV Tamim Aldar used the ship’s only lifeboat to reach shore. Photograph: Vikash Mishra

Mishra and Arsu Lobo, who are both Indian, and Tesfa Michael and Welday Mehari Ayra, who are Eritrean, are the last of the 36 crew members who were left abandoned at sea in several vessels, all owned by Elite Way Marine Services, a UAE company. The other seafarers have been successfully repatriated.

In April, the Guardian reported the plight of Captain Ayyappan of the MV Azraqmoiah, who campaigned on behalf of the seafarers to get their outstanding wages. Elite Way Marine Services subsequently repaid the crew between 40–60% of their wages.

The four men were advised to return to the ship and were taken back on a launcher. The ship has now been towed by the authorities to Dubai Maritime City port, according to lawyers for the seafarers. The FTA said the men were fed and treated well.

David Hammond, founder of the maritime charity Human Rights at Sea, said the threat of prison was one of many wrongs in abandonment at sea cases. He said the men had feared the prospect of jail.

“We’ve had reported to us they were told they faced prison,” said Hammond. “The question is why are seafarers being potentially criminalised when they are being abandoned and abused?”

Captain Abdullah Darwish Al-Hayyas, director of maritime transport affairs at the FTA, said: “No one has been put in prison because of him being abandoned. There is no such law that the seafarers will be imprisoned.” He said he had spoken to the coastguard, who told him they were “surprised such things had been mentioned”.

He added: “The coastguard immediately called the owner and took an undertaking, in writing, the case would be resolved very shortly. They treated the seafarers well, provided them with provisions and assistance, and took them back to the ship.”

According to the FTA, the UAE provides abandoned seafarers with assistance from coastguards, immigration and other authorities. New legislation, currently at the approval stage, would allow the authority to confiscate and sell abandoned ships in order to pay seafarers, it said.

Shehab Mamdouh, of the law firm Fichte and Co, said he was in negotiations with the owner about securing the men’s unpaid wages.

The men have been offered less than 60% of what they are owed by Elite Way Marine Services, but want at least 80%, Mamdouh said. The owners have said the men should have their money by 15 July.

Rev Andy Bowerman, the Middle East and south-east Asia director of Mission to Seafarers, said: “These men have been subjected to a horrific situation. I was very disappointed that the coastguard could not find a way for them to stay.”

Bowerman is meeting with UAE ministers next week to discuss the growing problem of vessel owners abandoning crews in UAE waters.

The International Transport Federation and other seafarers’ rights groups are lobbying the UAE to signed up to the Maritime Labour Convention, which gives seafarers greater protections.

In April, Elite Way Marine Services said they had encountered financial problems. They could not be contacted for this article.