Those who make it that far then step aboard overcrowded, shoddy boats that head out across the Mediterranean from Libya or Algeria. The odds of dying at sea on the way to Italy are grim: as high as one person for every 23 who try.
Despite the risks, three to four times as many migrants as usual have been streaming into Libya from Niger, a popular place to cross the Sahara, in recent weeks, according to Giuseppe Loprete, chief of mission in Niger for the International Organization for Migration. As many as 17,000 people made the crossing in a single week in June.
About 240,000 migrants are now in Libya, looking for work or waiting to cross, he said. The ones getting on boats in recent days are just the tip of the iceberg.
More than 2,800 migrants and refugees have died crossing the Mediterranean Sea so far this year, a 56 percent increase from what was recorded in the same period last year, according to the migration organization.
To try to stop people from boarding boats for Europe, the European Commission said last week that it would give as much as $70 billion for projects in several nations in the Middle East and Africa that have the largest numbers of migrants.
For West Africans, just getting to Niger on the arduous trek to Europe costs about $400, a sum often gathered by pooling money from relatives who sell their livestock or personal belongings. Then to carry on from Niamey, the capital, they must pay another, bigger fee, which catches many people off guard. They often get trapped, scrambling for more cash to push on.
Mr. Thiam got a call from his brother, Amadou, 25, when he arrived penniless in Niger. The family sold cattle and sent him money to keep going. Halfway to Libya, robbers attacked his group, but Amadou managed to flee before anyone could take his cash. He finally made it to the overcrowded boat carrying 800 people, only to drown when it sunk off the coast of Libya as a cargo ship was coming to its rescue.
He had never been on a boat before. He could not even swim.
Mr. Thiam tried to make a living for his family in their home village after his brother died. His small farm — the only option he had for work there — was already struggling. Then a few cows finished off the patch of corn he had managed to coax out of the soil.
So he came to Dakar from his village nearly 400 miles away to look for work. He and more than a dozen other men now live in a concrete house in Parcelles Assainies Unité 8, a development on the outskirts of Dakar created in the 1970s to shelter the poor. The rooms consist of nothing but straw mats crammed together to fit as many people as possible.
Across Africa, the treacherous journey to Europe often begins in houses like this one — a halfway house, of sorts, an in-between spot for men who have left their families to look for work but are not yet desperate enough to cross the sea. The men cram five or more to a room, everyone scraping by with odd jobs, if they are lucky, in places with some of the highest unemployment rates on the planet.
One by one, the men peel away to try their luck getting to Europe.
Amadou Konte, 26, has been hunting for work in Dakar for weeks, living hand-to-mouth. He has never been on a boat and cannot swim, either, but he is certain if he can make it to Italy, an uncle living there will help him find a job.
Like the other men, Mr. Konte has a sense of fatalism about what he knows to be a dangerous journey.
“If you’re going to die, you’re going to die,” he said.
The situation is replicated in house after house throughout the neighborhood, the city and the entire region. What few good jobs there are go to those with an education.
“You know, if you haven’t been to school, you can’t pretend like you’re going to have other jobs,” said Mr. Thiam, who attended religious school but has no other education.
Each day, Mr. Thiam, who has the timid gait of a wide-eyed tourist in the big city, is out the house by about 7 a.m., wandering the streets and knocking on the doors of homes and businesses to ask if he can clean toilets and floors.
Sharing the floor in Mr. Thiam’s room is a man who works as a money changer, two men who take a rag and shoe polish downtown to look for customers, and another young man who cannot find work at all.
“It’s very hard here to find a job, not just here in Senegal but in Africa generally,” said Mouhamed Ndao, 35, one of the shoe shiners. “If you want to think about your children’s future, you have to go to Europe.”
Forced together by circumstance, the men take care of one another, chipping in on medicine if one is sick or more of the $40 monthly rent if one cannot afford it. Sometimes at night they drink tea and talk about their problems. But mostly, tired from their long days, they just go to bed.
“We don’t have family and friends to support us,” said Mr. Ndao, who brought his three young daughters with him because they are seeking medical treatment in Dakar. “We have mercy for each other.”
All the men at the house said they know someone who has made it to Italy or France — an uncle or a friend. The fruits of their journeys are on display in their home villages, where the beneficiaries have new smartphones, televisions or houses. The families of the men here wonder why they cannot have this, too. If they return home empty-handed, they fear they will be rejected.
As his daughters huddled nearby, Mr. Ndao stood in the center of a dozen men, a bare bulb serving as his spotlight, and spouted a migrant’s soliloquy:
“If you don’t have money in our society, they don’t even see you as human. If your kids come to you and want even just one dollar and you can’t give it to them, you are ashamed. What if your parents need something and you can’t support them? At a certain point you become overwhelmed with bitterness. To take the risk will be better than doing nothing. Even if you die, it’s worth the risk.”