CAIRO — A boat carrying 86 migrants sank in the Mediterranean and left only three survivors, authorities said Thursday, just days after an airstrike on a detention center near the Libyan capital killed dozens of others.

The twin tragedies illustrate the almost unthinkable choice facing those who have reached the North Africa coast while seeking a better life in Europe: Risk a hazardous sea voyage in a flimsy, rubber-sided boat, or face being crammed into a detention center, where some of the migrants say they have been forced to assemble weapons for someone else's war.

"I fled from the war, to come to this hell of Libya," said one teenager from sub-Saharan Africa who suffered minor injuries in Tuesday night's airstrike near Tripoli. "My days are dark here."

The German migrant rescue charity NGO Sea-Eye helps people to get off an overloaded rubber boat spotted in international waters off the Libyan coast. FABIAN HEINZ/SEA-EYE.ORG / AFP - Getty Images

The International Organization for Migration said a boat sank late Wednesday off the Tunisian city of Zarzis and 82 of the migrants who had been on board were missing. Fishermen pulled four men who survived from the water, but one died overnight, said Lorena Lando, the agency's head in Tunisia.

On Thursday, the Italian humanitarian group Mediterranea Saving Humans said one of its sailboats has rescued another 54 migrants about 65 nautical miles north of Libya.

The United Nations and aid groups blame the deaths in part on the European Union's policy of partnering with militias in war-torn Libya to prevent migrants from trying to cross the sea. They say the policy leaves migrants at the mercy of brutal traffickers or confined in detention facilities near front lines, often without adequate food and water.

Migrants who survived Tuesday's airstrike said they were conscripted by a militia to work in a weapons workshop at the Tajoura detention center, which had been the focus of a U.N. warning in May after an earlier airstrike hit 100 yards away.

The wounded teenager said he labored without pay for eight months in the workshop adjacent to a hangar housing dozens of migrants and weapons.

He fled war in his homeland at the age of 14, following others who made it to Europe in rickety boats, said the youth, refusing to give his name or nationality for fear of reprisal from the militias. But by the time he reached the coast, Europe was no longer welcoming and he was caught by the EU-funded Libyan coast guard.

The Tripoli government has blamed the self-styled Libyan National Army and its foreign backers for the airstrike, which killed at least 44 and wounded more than 130.

The decision to store weapons at the facility may have made it a target for the self-styled Libyan National Army, which is at war with the weak, U.N.-recognized government in the capital.

The army, led by Field Marshal Khalifa Hifter, says it targeted a nearby militia position and denies striking the hangar where the migrants were being held. U.N. human rights chief Michelle Bachelet said the attack might amount to a war crime.

Migrants wait with their belongings at a detention center that was hit by an airstrike in the Tajoura suburb of Tripoli on July 3. ISMAIL ZITOUNY / Reuters

Hifter, whose forces control much of eastern and southern Libya, has received support from Egypt, France, the United Arab Emirates, Saudi Arabia and Russia.

Many of those who died in the attack were crushed under debris as they slept. Pictures shared by the migrants show the hangar reduced to rubble littered with body parts. More than 48 hours afterward, relief workers were still removing bodies while the wounded lay on bloody mattresses in a courtyard, receiving medical aid.

In the aftermath, several of the detainees told visiting aid workers that guards fired on them as they tried to escape. There are no plans yet to evacuate the survivors from Tajoura.

Salah Marghani, former Libyan justice minister and a human rights lawyer, said any European condemnation of the airstrike is hypocrisy. Led by Italy, the EU has trained and funded the Libyan coast guard despite its record of abuses, and also relied upon militia-run detention centers to lock up migrants indefinitely, fueling instability.

The EU has said repeatedly, including after the airstrike, that migrants should be evacuated to safe places, but has offered no specifics — or a haven for more than a handful from Libya.

"This policy intentionally turned Libya into a firewall to refugees who escaped war and famine in Africa," Marghani said. "This firewall gives the refugees two choices: either to drown while trying to escape Europe, or being arrested in the high sea to be sent back to Libya."