TUNIS (Reuters) - Two militants in Tunisia blew themselves up on Thursday after they exchanged fire with security forces who stormed their hideout and encircled them, the interior ministry said.

The existence of the cell in the city of Jilma, 250 km (156 miles) south of the capital, shows the challenge Tunisia faces from militants, some of whom cross the porous borders from Libya and Algeria.

Authorities identified Ezzedine Alaoui, leader of the Brigade of Jihad and Unity, as among the dead, said Soufien Sliti, a spokesman for the counter-terrorism agency.

He was the mastermind of a terrorist plot to take control of Sidi Bouzid province south of Tunis, Sliti said.

Aloui joined Jund Al Khilafa, another militant group in the mountains between Sidi Bouzid and Kasserine, in 2014 but left to join the Brigade of Jihad and Unity, that came to be known as the cell of Sidi Bouzid, Sliti said.

Most members of the cell were arrested on Dec. 5 in Sidi Bouzid in an operation during which material for making bombs was seized.

Since an uprising against autocratic leader Zine Abidine Ben Ali in 2011, Tunisia has been battling militant groups operating in remote areas near the border with Algeria.

Authorities estimate about 3,000 Tunisians have joined Islamic State and other jihadist groups in Iraq, Syria and Libya, while high unemployment has stoked unrest in recent years in southern and central areas.

Dozens died in attacks in 2015 including two against tourists, one at a museum in Tunis and another on a beach in Sousse. A third attack targeted presidential guards in the capital and killed 12. Islamic State claimed the attacks.

(This story was refiled to add dropped word in headline.)