BEFORE the refugees came, Dadaab was a forgettable little way-station in north-eastern Kenya on a dusty road to Somalia. More than two decades later the original town is dwarfed by five sprawling camps spread across flat, dry land that together house at least 350,000 people. It is Kenya’s fourth-largest population centre and the world’s biggest refugee settlement. As Kenya’s government struggles to deal with Islamist terrorism, it is blaming Somali refugees and wants Dadaab gone.

The Shabab, a group that is linked to al-Qaeda, are based in Somalia but operate with growing frequency in Kenya. They boasted that they had perpetrated a massacre in early April, when four gunmen killed 148 people, mostly students, at a university in Garissa, a town 80 km (50 miles) south-west of Dadaab. The Shabab also carried out an attack in 2013 on the Westgate shopping mall in Nairobi, Kenya’s capital, killing at least 67 people.

Kenya’s response to the latest attack was to threaten to close the camp and to outlaw 85 remittance companies, civil-society groups and businesses, all accused of funding terrorism. “The refugee camps are full of Shabab,” says Albert Kimathi, a local official in Dadaab town. “This is the breeding ground for what goes on in Garissa, Nairobi and Mombasa,” he says, citing Kenya’s port, where Muslim dissent has grown.

After Westgate, Kenya’s government proclaimed a “voluntary repatriation” scheme that took over a year to get going and was largely ignored; barely 2,000 Somalis have taken up the offer to return. In the wake of the horror in Garissa, William Ruto, Kenya’s deputy president, said the UN refugee agency that oversees Dadaab should close the camp within 90 days; otherwise, he promised darkly, “we shall relocate them ourselves.”

In Dadaab the refugees expressed panic and defiance. Many have lived there for a quarter of a century and are afraid to go back to their country, which is still rent by violence. “Let them come!” says Kadijo Ali, a slim, feisty woman who came to Dadaab as a baby and now has her own six-month-old daughter strapped to her back. “I’m not going anywhere, even if they kill me.” Residents deny that the camps are riddled with jihadists. “There are no Shabab here,” says Mohamed Yusuf, a 44-year-old teacher and clan elder. “I’ve lived in Dadaab for 25 years and have never seen a training ground or met a Shabab. If they came, we would report them to the police.”

In any case, Kenya’s government could not afford to move so vast a throng of people. Nor would it enjoy the opprobrium if it defied international law by evicting refugees. Kenya’s foreign minister, Amina Mohamed, herself an ethnic Somali, admitted as much when she set up a “tripartite commission” with representatives of Kenya, Somalia and the UN refugee agency to plan Dadaab’s future. When John Kerry, the American secretary of state, visited Kenya on May 4th he acknowledged that hosting so many refugees for so long was “an enormous challenge”. He promised the UN refugee agency $45m towards its Kenya operations, adding that he was “confident that Dadaab will remain open”. Two days later Kenya’s president, Uhuru Kenyatta, softened the government’s stance, saying that Kenya “has been, and will continue, fulfilling its international obligations.”

The evidence suggests instead that terrorism in Kenya is increasingly home-grown. All four Garissa gunmen were probably Kenyan. Others arrested and tried for Shabab attacks in Kenya in the past have been Kenyan, too. Some were converts to Islam. Not one was a refugee.