Ben Guerdane is a dusty town in Tunisia's south, just 20 miles from the border with Libya, a roiling nation of militias and guns galore. It's a smuggling town, and it depends on the nearly 300-mile border with Libya to survive.
In more normal times, it's everyday products that get smuggled, but these days something more nefarious is coming across that border — weapons and militants.
The spillover from the conflict in Libya is setting off alarm bells in Tunisia, threatening a fragile democracy in the one place that emerged from the 2011 Arab revolts as a bright spot.
Meanwhile, Libya is a nation in chaos with three battling governments, a plethora of militias and a security vacuum being filled by a growing presence of the Islamic State extremist group on Tunisia's border. And even more ominously, many of those Islamic State fighters now in Libya are actually from Tunisia.
On March 7, Islamic State fighters tried to seize Ben Guerdane and claim it for ISIS. If the extremists had succeeded, it would have given the group free movement between Tunisia and Libya. But the Tunisian security forces prevailed in bloody fighting that left more than 50 dead.
On Ben Guerdane's main street, cafe owner Omar Rabshi recounts how it began with gunfire at 5 a.m.
"I came here to my cafe and I found lots of armed people here," he says. "About five who were checking people and making people show ID, one had the RPG and the others carried Kalashnikovs."
The gunmen were in their 20s, were unmasked and spoke with Tunisian accents. They patted people down. If they were civilians, the gunmen let them go. If they were from the Tunisian security forces, the gunmen killed them. Then they set up checkpoints at each end of the road and made a declaration.
"We are the Islamic State and tomorrow we will govern you," Rabshi recalls them saying.
All along the street are the signs of the recent battle. Bullets scarred the building next to Rabshi's cafe, where ISIS shot a customs agent. Up the road, the police station is pocked with evidence of the shootout between officers and ISIS fighters. And in the main square, a banner hangs, emblazoned with pictures of the town's dead.
Police say it was a multipronged attack by some 70 ISIS men. And the attackers were mostly Tunisians who had trained with ISIS across the border in Libya, many from this very town. The fighters came with a truck full of weapons to hand out to sympathetic townspeople.
Some swarmed through farms to hit the army barracks on the west side of town; others hit the police station in the town center; and another group went to the home of the head of the anti-terrorism brigade, Abdul Atti al-Kabir, to assassinate him.
His cousin Jilan Abdul Kabir shows me how it happened, walking me through the low cinder block walls erected on the farm and up the unpaved driveway.
"We heard gunfire," he says. "We saw a truck with masked gunmen drive by and then return."
So Abdul Kabir and his cousin ran. The attackers trapped al-Kabir against a wall in the yard. All he had was a pistol filled with eight bullets.
Abdul Kabir jumped over a wall to escape.
He heard his cousin say, "I lived as a man and I will die as a man." Then came the gunfire.
"I heard them yelling, 'God is great,'" Abdul Kabir says. That's when he knew his cousin was gone.
He later found his cousin's body on a mound of dirt against the wall where he had been cornered.
Inside al-Kabir's home, his brother Omar blames the Tunisian justice system.
"My brother arrested so many of these terrorists," he says. "But the courts let them go just because the police use some violence to get the truth from these criminals. The court says, 'Well you beat them, so I will set them free.' It's incredible."
That kind of sentiment is growing in Tunisia, where more people are willing to throw out civil liberties, a key promise of the new democracy, in favor of tough security measure that may bring stability. After three major attacks last year, the country is under a state of emergency.
But in Ben Guerdane, ISIS made a fatal miscalculation. The extremists thought it was ripe for rebellion. Instead, in a matter of hours the militants had lost.
Back at the cafe, Rabshi explains why ISIS thought it could take Ben Guerdane.
"They thought because Ben Guerdane is a city on the borders, because there is no development, there are no factories, it's been oppressed for 50 years. It's living under marginalization. No one takes care of it," he said.
But people in Ben Guerdane, he says, don't take kindly to any outside occupiers. And ISIS was turned back — at least this time.
More attacks are expected. Hundreds of Tunisians are training with ISIS in Libya. And that's in part because there is dissatisfaction across Tunisia.
Many feel the promises of social justice and economic prosperity have not materialized after Tunisia's dictatorship was ousted in 2011. ISIS promises power, money and paradise in the afterlife.
Meanwhile, Tunisia is building a wall that's designed to stem the flow of fighters and weapons. It's a sand berm that stretches for more than 100 miles and is reinforced with water trenches and electronic surveillance. The U.S. and Germany are helping Tunisia.
At the central police station in Ben Guerdane, police Lt. Salah Mansouri acknowledges the growing danger.
"The security of Libya is the security of Tunisia," he says. "And the security of Tunisia is the security of Libya."
KELLY MCEVERS, HOST:
Now we're going to hear about a Tunisian town that repelled an Islamic State takeover. Earlier this month, ISIS fighters attacked from across the border with Libya. They hoped to find sympathetic locals. Instead, the town rallied against the militants. But the attack is still worrying for Tunisia, a country with a new and fragile democracy. NPR's Leila Fadel reports.
LEILA FADEL, BYLINE: The border town of Ben Guerdane is a smuggler's haven, a place where men hawk subsidized fuel and other goods brought in from Libya some 20 miles down the road. But on March 7, something else came across the border which was much less welcome - a small army of invaders who wanted to rule.
On the town's main street, I meet cafe owner Omar Rabshi. Through my interpreter, he tells me it was about 5 a.m. when the gunfire started.
OMAR RABSHI: (Through interpreter) I come here to the - to my cafe, and I found loads of armed people here, about five who were checking people. And one has the RPG and the other with the Kalashnikovs.
FADEL: He says the gunmen spoke with Tunisian accents. They patted down citizens. If they were civilians, the gunmen let them go. If they were from the Tunisian Security Forces, the gunmen killed them right on the street. The armed men set up checkpoints on each side of the main road, and Rabshi says they made a declaration.
RABSHI: (Through interpreter) We are the Islamic State. We are governing you tomorrow.
FADEL: You can still see the scars of the battle for this town, like on the shutters of a hardware store where the owner says a local official was executed.
So that's another bullet hole.
RABSHI: (Through interpreter) Because they killed the customs agent here.
FADEL: Police say it was a multipronged attack by some 70 men. The fighters had trained with ISIS across the border in Libya, but they were almost all Tunisians. They brought extra weapons, hoping sympathetic townspeople would join their cause. Some attackers went to the home of the anti-terrorism commander to assassinate him. His cousin Jilan Abdul Kabir was with him.
He shows me what happened. It started at the end of the long dirt driveway.
We heard gunfire in the distance, he says, then we saw a truck with masked gunmen drive by and then return. The attackers ran after the commander, cornering him in the yard. All he had was a pistol with eight bullets.
Kabir jumped over one of the walls to escape. He heard his cousin say, I lived as a man, and I will die as a man. And then there was an exchange of gunfire, killing the commander and two of the attackers. But ISIS had made a fatal miscalculation. They thought this was a town ripe for rebellion. Instead, the people rallied around the Security Forces, and in just a few hours, the militants had lost.
Back at the cafe, Omar Rabshi explains that ISIS was trying to exploit dissatisfaction in Ben Guerdane.
RABSHI: (Through interpreter) They thought that just because Ben Guerdane is a city on the borders, there's no development, there are no factories, it's operated for 50 years, it's living under marginalization, no one takes care of it.
FADEL: But people in Ben Guerdane, he says, don't take kindly to any outside occupiers. And ISIS was turned back, at least this time. More attacks are expected. Hundreds of Tunisians are training with ISIS in Libya, and that's in part because there is dissatisfaction across Tunisia. Many feel the promises of social justice and economic prosperity after Tunisia's dictatorship was ousted never materialized. ISIS promises power, money and paradise in the afterlife. To stem the flow of fighters and weapons from the border, Tunisia is building a wall with the help of the U.S. and Germany. Police Lt. Salah Mansouri summed it up this way.
SALAH MANSOURI: The security of Libya is the security of Tunisia, and the security of Tunisia is the security of Libya.
FADEL: He acknowledges there is a growing danger. Leila Fadel, NPR News, Ben Guerdane. Transcript provided by NPR, Copyright NPR.