AFTER GUNMEN ATTACKED shoppers at Westgate Mall in Nairobi in 2013, killing 67 people and injuring dozens more, Kenyan authorities did not hesitate to blame the violence on Dadaab, a complex of refugee camps in northeast Kenya home to roughly half a million people, mostly Somalis.

“Dadaab is a nursery for terrorists,” the secretary for the interior said on national television. Another politician called Dadaab a “training ground” for terrorists. One policeman claimed to have seen a helicopter carrying the attackers out of Dadaab to Nairobi. The crackdown against Somalis in Kenya was swift and vicious, as detailed in a new book by Ben Rawlence, City of Thorns: Nine Lives in the World’s Largest Refugee Camp.

Rawlence writes that no evidence emerged that Westgate was plotted in Dadaab. Yet Kenya used the attack to try to shut down the camp. The international community, especially the United States, reiterated its support for the Kenyan government and largely ignored the abuses committed in its war on terror.

The mistaken idea that desperate refugees are particularly likely to radicalize and join terrorist groups is having a moment outside Kenya, too. It underlies Western fears about people fleeing conflict in Iraq and Syria. After the attacks in Paris last November, the media quickly grasped at flimsy evidence indicating the perpetrators had arrived as refugees, and public opinion in Europe swung against asylum seekers — even though the majority of the suspects so far identified have been French or Belgian nationals. In the United States, Republican politicians have fallen all over themselves in the race to be sufficiently anti-refugee.

City of Thorns offers a nuanced corrective. Rawlence spent years visiting Dadaab and interviewing refugees from the region while working as a researcher with Human Rights Watch. Dadaab, a tent city first established in 1991, is now home to generations of Somalis who have fled civil war and famines, as well as Ethiopians, Eritreans, Congolese, Sudanese, and others escaping the region’s conflicts. Rawlence explores Dadaab through nine of its inhabitants, portraying them with complexity and compassion, while also critiquing the counterterror policies that have done little, he argues, to bring stability to East Africa.

Rawlence opens his book with a 2014 meeting he attended in the White House with members of the National Security Council, a year after Westgate. Rawlence understood that the NSC wanted to hear why — with desperate poverty and overcrowding and infinitesimal chances for resettlement — had all the young men in Dadaab not joined al Shabaab? Rawlence had often pondered the same thing, but found that “the very question was an insult.” To the refugees he knew, “al Shabaab were crazy, murderous criminals.” Besides, the camps were heavily policed by Kenyan authorities, security guards, and local residents alike. Al Shabaab had a shadowy, often deadly, presence in the camps, but Rawlence couldn’t in good faith tell the gathered officials that Dadaab contributed to terrorism.

“There were no further questions and the meeting came to an early conclusion,” he writes. He had “fallen into the liberal lobbyist’s trap: If the youth were not at risk of being radicalized, then perhaps the NSC didn’t need to worry about Dadaab after all.”

Speaking at an event in New York a few weeks ago, Rawlence said that “so much lazy policy” is based on the idea that the camps are “hotbeds of radicalization.” Western powers throw military aid and drone strikes behind regional governments, he said, but “nobody wants to acknowledge that Kenya is not an honest broker in Somalia, Ethiopia is not an honest broker in Somalia.”

Kenyan military intervention against al Shabaab often made things worse. In the year after the Kenyan army invaded Somalia in fall of 2011, there were 30 attacks on Kenyan soil, against both civilians and security forces. When Kenyan forces took the southern Somali city of Kismayo, “all the sectors in which al Shabaab had been active in trafficking — charcoal, sugar, drugs, weapons, and humans — now boomed.” Western intelligence agencies, according to Rawlence, believed that the Kenyan army simply split revenues with al Shabaab and a local militia. The change in the power dynamics of smuggling affected the camp’s economy, Rawlence writes, as the price of sugar skyrocketed and fights over clan control of trade erupted.

Dadaab’s residents also suffered directly from al Shabaab’s reprisals. Improvised explosives and suicide bombers hit the camps. When seven boys were injured in a shooting in a ramshackle cinema where they had gathered to watch soccer, residents dubbed it “Westgate Two.” Sanitation, healthcare, food distribution, and other aid in the camp dwindled as international aid groups withdrew amid the insecurity; foreign aid workers made obvious kidnapping targets.

But perhaps worst of all was the retaliation from Kenyan authorities. Police often swept through the camps, beating any young men they found. Somalis living in Nairobi had to pay bribes to the police or be rounded up and detained or sent to Dadaab. The book ends in late 2014, as Kenya decided that it wanted the camp officially closed. Refugees were to leave in what Kenya called “spontaneous, voluntary returns,” even though few people wanted to go back to Somalia, which was still very much at war. As Rawlence documents, life in the camps simply got harder. “Dadaab was stuck: no improvements, no investments, but no movement, either,” he writes.

Through these dire happenings, Rawlence deftly winds refugees’ stories. He provides psychological portraits of his characters, recording their lives with sympathy and without moralizing. Tragedy and horror, rape and bombs, shape lives in the camp, but so do love and ambition, jealousy and luck.

The principal characters include Guled, a teenager who fled conscription in al Shabaab’s youth gangs in Mogadishu, and a Somali-Sudanese couple, Muna and Monday, whose mixed-religion marriage causes an uproar. Tawane, a young Somali man who had grown up in the camps and became an influential youth leader, explains the word buufis — a term invented in Dadaab to describe the longing to leave, and the particular depression that comes after one of his friends succeeds in escaping. And there is Lamma, an Ethiopian exile who spent an hour each day collecting water for a tiny garden, “so that his child could know what it was like to sit on grass.”

Top photo: Somali men wait in line outside a registration and food distribution point in the Dadaab refugee camp in northeastern Kenya on July 5, 2011.