In towns and villages across northern Tunisia, the friends and neighbours of the six National Guardsmen <a href="https://www.thenational.ae/world/militants-kill-at-least-six-police-officers-in-western-tunisia-1.748232">killed by militants</a> in the country's west took to the streets to escort the coffins through the blistering summer heat to their final resting place. Others were buried in an official state funeral in Tunis. The attack near the village of Ain Sultan in Ghardimaou, an isolated and hardscrabble mountainous region in Tunisia’s northwest, has shaken a country that had come to regard the worst of the terror attacks that have dogged its recent history as behind it. In 2015, 22 mostly European tourists were killed and 50 others wounded in an assault on the Bardo National Museum. Just three months later, 38 mostly British holidaymakers were shot dead when gunmen attacked a hotel at the tourist resort of Port El Kantaoui near Sousse. The attacks made international news and devastated the country’s key tourist economy. The latest incident has also ratcheted up pressure on a government seemingly locked in a bitter internecine struggle for its own survival. According to the interior ministry, the border patrol “was hit in a landmine ambush that killed six agents” on late Sunday before gunmen opened fire on the surviving soldiers. Eyewitnesses told local media that the militants had lain in wait in a communications black spot, knowing the patrol would be unable to call for assistance, before detonating their homemade device. Afterwards, the bodies of the slain were stripped of their weapons, which will now presumably be used elsewhere. The following day brought the inevitable claim of responsibility, with the “Mujahideen” of the Katiba Uqba ibn Nafi (KUIN) saying they had carried out the latest act of violence. The Tunisian offshoot of Al-Qaeda in the Islamic Maghreb (AQIM) are known to be active in the borderlands with Algeria. The Tunisian government believe the men behind the Bardo attack were members of KUIN, although international experts suggest they had already defected to ISIS at the time. Despite the concerns of a return to a more violent period, analyst Aaron Zelin of the Washington Institute was keen to place Sunday’s attack in context. “This is the first attack by the group this year,” he said. Rather than being the first shot in a wider offensive, statistically at least, he said the group appeared to be in decline. “There were three attacks last year, five the year before that and six in 2015. It’s really a bit too early to start seeing much more into this than the immediate and tragic loss of life.” Tunisia's last major terrorist attack occurred two years ago, close to the Libyan frontier, when units of the Islamic State attempted to seize the fractious border town of <a href="https://www.thenational.ae/world/mena/syria-jihad-and-the-boys-from-tunisia-s-ben-guerdane-1.404301">Ben Guerdane</a> as part of a projected Emirate. That attack, which lasted days, claimed the lives of 13 security forces and seven civilians. <strong>_______________</strong> <strong>Read more:</strong> <strong><a href="https://www.thenational.ae/world/mena/al-qaeda-linked-group-claims-attack-on-tunisian-soldiers-1.748595">Al Qaeda-linked group claims attack on Tunisian soldiers</a></strong> <strong><a href="https://www.thenational.ae/world/mena/tunisia-pm-fires-senior-minister-amid-alarm-over-migrant-deaths-1.737710">Tunisia PM fires senior minister amid alarm over migrant deaths</a></strong> <strong><a href="https://www.thenational.ae/business/economy/risks-to-tunisia-s-economic-stability-requires-immediate-action-imf-says-1.735652">Risks to Tunisia's economic stability requires immediate action, IMF says</a></strong> <strong>_______________</strong> However, away from the dusty flat expanses of Tunisia’s Libyan border, KUIN have remained a steadfast presence in the hills. In the Chaambi mountain range, along the Algerian frontier, they compete for influence and territory with the ISIS-linked Jund al-Khilafah-Tunisia. According to researcher Matt Herbert, writing for the <a href="https://carnegieendowment.org/2018/06/28/insurgency-in-tunisia-s-western-borderlands-pub-76712">Carnegie Endowment for International Peace in June</a>, the protracted, if relatively low-level, conflict has claimed the lives of "at least 127 militants and 118 soldiers, national guardsmen, and police officers", over the past seven years. Much of the credit for the group’s survival lies within the endemic poverty of the territory they operate within. Far away from the luxurious resorts of Hammamet and Sousse, unemployment hovers around the 15 per cent mark, stretching to almost double that figure in areas along both borders. In the face of such hopelessness, short-term local support is available for purchase even upon the most modest of budgets. Some indication of the disillusionment with Tunis’ power politics was evidenced on the day of the attack, when the acting interior minister, Ghazi Jeribi, was greeted with boos and shouts of ‘degage’ (get out) on his arrival in Ghardimaou. Nevertheless, even in the face of acute military pressure, both KUIN and Jund al-Khilafah have retained their presence along the border. Mr Herbert also believes they have “quadrupled in size,” leaving them free to take full advantage of any emerging political crisis in Tunis. This crisis appears to have arrived. Fighting for survival against attacks from his own party, beleaguered Prime Minister Youssef Chahed sacked the country’s former interior minister, Lotfi Brahem, after more than a hundred migrants drowned after their boat capsized in in June. Accusations of a purge following Mr Brahem’s dismissal were quick in coming. Speaking to local radio station, Shems FM, the day after Sunday’s attack, the spokesman for the National Guard's general trade union, Mehdi Bouguerra, said there was a politicisation of the security services that had left members unsure of who they could trust and to whose faction may have secured their loyalty. Though friction within the security services is unlikely to have contributed to Sunday’s attack, it may threaten to hamper the response. Nevertheless, Mr Jeribi, despite his less than warm welcome in Ghardimaou, was defiant. “We will avenge our martyrs and we will relentlessly pursue the terrorists into their last hiding places,” he said. “The fight against terrorism is a long-term battle, but this phenomenon has no future in Tunisia.” However, how the country will maintain that battle in the face of popular resentment over growing price rises and ingrained unemployment is unclear. For now, KUIN and their Jihadist competitors maintain their ground, looking for the societal gaps that may offer the roots of their dwindling ranks some purchase.