TUNIS (Reuters) - Islamist militants beheaded a Tunisian teenager in a rural central province and sent his head to his family after accusing him of spying for the military, Tunisian security sources said on Friday.

Militants have made two major attacks targetting foreign tourists this year, and the army is fighting a low-level conflict against pockets of militants in rural areas near the Algerian border.

Security sources said militants killed the 16-year-old as he was herding sheep in a rural area in central Sidi Bouzid province.

"The terrorists put his head in a bag and ordered his friend to take it back to his family," one of the sources said. They did not give further details.

Four years after revolt toppled autocrat Zine El-Abidine Ben Ali, Tunisia has completed its transition to democracy with free elections, a new constitution and compromise politics between secular and Islamist parties.

But security forces are battling militants including Ansar al Sharia, which is listed as a terrorist group by Washington, and Okba Ibn Nafaa, a brigade of al Qaeda-affiliated fighters operating in the Chaambi mountains along the Algerian border.

(Reporting by Tarek Amara; Writing by Patrick Markey; Editing by Ruth Pitchford)