“They said: ‘You are thieves. Why are you out walking at this hour?’ ” Mohamed ag el-Hadj, a 27-year-old former soldier in the Malian Army recalled. He and a friend out for a stroll at 7 in the evening found themselves surrounded by two carloads of well-armed men. The men tied the friends’ arms behind their backs, bound them to a tree and forced them to kneel, bending forward, for the evening. In the morning, “everything was swollen.”

“It was scary,” Mr. Hadj recalled. “They insulted me, called me a savage, an unbeliever.”

When they found a cigarette pack in his shirt pocket, they beat him about the face. “For nothing,” the young man said. “These are their punishments.”

Living under rows of dirty blue-and-white United Nations tents or under makeshift sheet-and-stick shelters, refugees spoke of heavily armed men of numerous races, nationalities, and languages — “black, brown, yellow, white,” one said — now controlling the streets. One spoke of encountering Afghans, Pakistanis and Nigerians.

American counterterrorism experts express concerns that Mali could turn into a magnet for international terrorists, but they say that such reports have not yet been corroborated. The turmoil in northern Mali has likely drawn extremists from the region, though, experts say.

“The concern is that these local groups will further establish a safe haven in northern Mali to serve as a base of operations,” said a United States official who asked not to be identified while discussing sensitive intelligence matters. “Then maybe northern Mali could become a destination for foreign fighters from the wider region and even further afield, but it isn’t there yet.”