TUNIS — Nearly four years after the Arab Spring revolt, Tunisia remains its lone success as chaos engulfs much of the region. But that is not its only distinction: Tunisia has sent more foreign fighters than any other country to Iraq and Syria to join the extremist group that calls itself the Islamic State.

And throughout the working-class suburbs of the capital, young men are eager to talk about why.

“Don’t you see it as a source of pride?” challenged Sufian Abbas, 31, a student sitting at a street cafe in the densely packed Ettadhamen district with a half-dozen like-minded friends.

Tunisians have approved a new Constitution by a broad consensus, and a second free election is to take place this month. The country has the advantage of one of the Arab world’s most educated and cosmopolitan populations, numbering just 11 million, and it has some of the most alluring Mediterranean beaches.

But instead of sapping the appeal of militant extremism, the new freedom that came with the Arab Spring revolt has allowed militants to preach and recruit more openly than ever before. At the same time, many young Tunisians say that the new freedoms and elections have done little to improve their daily lives, create jobs or rein in a brutal police force that many here still refer to as “the ruler,” or, among ultraconservative Islamists, “the tyrant.”