Militants attacked army and police posts in the Tunisian town of Ben Guerdan near the border with Libya early on Monday, in clashes that killed at least 21 militants and five civilians, officials said. The interior ministry warned people to stay in their homes, as gunfire erupted in the center of town, AP reported. An army spokesman said soldiers had killed 20 militants after they attacked military and police posts. Hospital sources said at least five civilians had also died. Tunisia has built a trench along its border, worried about spillover from Libya where the self-styled Islamic State terrorist group is expanding and western military advisers are training Tunisian border forces. Militants trained in IS camps across the border in Libya carried out several attacks on Tunisia last year, including the attacks on the Tunis Bardo Museum and a Sousse beach hotel targeting foreign tourists.