Those gathered in Tunisia, now the top North African departure country on the main migration route to Europe, have many different backgrounds. I met people from Burkina Faso, Gambia, Senegal, Nigeria, Somalia, Eritrea and Liberia. Some, like the Darfuris, are likely to be granted international protection and refugee status if they manage to reach a safe country. Others probably won’t — they are fleeing corruption and endemic poverty, places where health care is sparse and children die of preventable diseases. They seek opportunity and any version of a stable life. They almost exclusively come from former European or British colonies.

I met people looking to leave who had lived in Tunisia for years but had lost their jobs and been evicted after remarks by the country’s president, Kais Saied. In February, Mr. Saied suggested that sub-Saharan Africans were part of a criminal arrangement “to change the demographic composition of Tunisia,” setting off a wave of abuse and persecution.

This did not stop the European Union from seeking a deal with Mr. Saied to curb migration: In return for “border management,” it will provide Tunisia with $118 million, and commit to providing additional assistance. To European leaders, Tunisia’s brutality — in early July, more than 1,000 sub-Saharan Africans were rounded up in Sfax and dumped on the Libyan border without food and water — may matter less than its willingness to collaborate.

Sitting on mattresses under an olive tree in Sfax, the 30-year-old Sierra Leonean Aisha Bangura picked lice out of a friend’s hair. She pointed out her young daughter, who was playing in the sand with four other children, using empty food cans as toys. Ms. Bangura said her husband died in the Libyan desert, which they walked through for nine straight days. Back in Sierra Leone, a country where the G.D.P. per capita was $461 last year, Ms. Bangura once sold oranges, but business dried up. “I didn’t have work,” she explained. “I didn’t have money to do business.”

In recent years, the economic situation across most of Africa has worsened, exacerbated by the pandemic and the war in Ukraine. Living in northern Uganda during the first lockdowns, I saw how quickly people began to starve as their meager savings evaporated. Last year, in Sierra Leone, I watched the cost of living crisis lead to deadly protests. Climate change makes everything worse. In Niger, it exacerbated malnutrition; in Somalia, it contributed to near famine.