It had been a long wait and, until the very last moment, there was the fear that they would not get out. But in the early hours of yesterday morning, the great escape began for the most desperate and afraid caught on the deadliest battlefront in Libya's brutal civil war.
More than 8,000 migrant workers have been trapped in Misrata, forced to live in a sprawling and squalid camp of tents and containers with little food or water. The exodus began just hours after pounding missile strikes by Muammar Gaddafi's forces, which later hit the port just after the ship taking them had sailed.
But it was not just the regime that these men, and their families, had grown to fear. Some of the inmates of Ghafr Ahmed camp, mainly from Egypt, sub-Saharan Africa and Bangladesh, had lost their lives in clashes with the revolutionary forces who control parts of this city under siege. Others had been arrested and accused of being mercenaries.
The inmates at Ghafr Ahmed camp at the northern edge of Misrata came to make their living from the wealth generated by Libya's oil. They had not been paid since the uprising began in the middle of February, but for the 1,182 who left on the Ionian Spirit, a chartered Greek-owned ferry, yesterday, the overwhelming feeling was that at least they were in one piece.
At the same time, they expressed their fear for friends and relations left behind. "Of course we are glad that we have a chance to leave, we have been praying to Allah to make this happen for the last two months," said 32-year-old Abdullah Miah, from Chittagong in Bangladesh.
"Every day, I woke up to sound of guns. When we had the cannons just now I thought I was going to die. Those not leaving now will continue to be in danger; my cousin could not get away. I am afraid for him."
The lives of the refugees had been imperilled by both sides in the fighting for the only rebel-held city in western Libya. Last week, five were injured by regime artillery fire, but two others were shot dead by rebel fighters while taking part in a protest about conditions at the Ghafr Ahmed camp.
The day after the deaths, Patrick Kwesi from Ghana, who had worked as a welder for an oil company, told The Independent: "We have barely enough food here and there are sick people who are not being given medicine; it is cruel to treat people in this way. These revolutionaries would not listen to us. They just opened fire, a man near me was shot in the chest; he was not doing anything. We are being treated badly by both sides. We cannot defend ourselves and these Misrata people know this."
Yunus Fatouni, a volunteer official with the revolutionary council running Misrata, was adamant that the trouble had been provoked by the inmates. "They were out of control; they were very threatening and charging us and there was only firing after we had told them many times to go back to their camp.
"We know these people want to go home and of course we want this to happen as soon as possible. There is little food in Misrata - I had to queue for two hours this morning just to get bread for my family - but we are still giving all we can to these people. It would be very helpful if the international community gave us some help in looking after these people and then helped to take them out."
The International Organisation for Migration (IOM), which organised the evacuation, plans several more trips. But officials of the agency also acknowledge that it is one of the most difficult missions they had undertaken in recent times and the ongoing violence brought with it the prospect of cancellation and delays.
The IOM, which delivered 400 tons of aid to Misrata in the ship that took out the migrant workers, had, in fact, been trying to carry out the evacuation for more than a month.
Jeremy Haslam, one of the agency's senior officials, had spent the intervening time trying to persuade the international body and shipping companies that it was imperative that the mission should be carried out despite the hazards it entailed.
Mr Haslam, from Yorkshire, now leading the IOM's operations in Uganda, said: "We first tried to get these people out before the 'no-fly zone' was established by the UN, but it was regarded as too dangerous at the time. This has been on my conscience for more than a month now.
"This has been a pretty complex operation. We have had to negotiate with governments and also the councils in Benghazi [the capital of the opposition government] and Misrata. It is not easy to get pilots and captains for something like this; we still had missiles coming in when we docked and the unloading of the aid had to take place with people wearing body armour.
"We shall continue to do a shuttle now to try and empty the camp; I am sure other organisations will pitch in. We have a fairly short window, we must get this done before Easter, which will be a very busy time for the charter companies and prices will shoot up."