Tunisian security forces on Monday killed two Islamist militants from the extremist group Ansar al-Sharia and arrested two others in a Tunis suburb, the interior ministry said.

The two men arrested, Mohamed Khiari and Mohamed Aouadi, are leaders of the Salafist movement's military wing and are implicated in the assassination of opposition lawmakers Chokri Belaid and Mohamed Brahmi, a ministry source said.

The killings and arrests came during a sweep in a northern suburb of Tunis by the anti-terrorist squad, the source told AFP.

The slain jihadists died after a heavy exchange of fire, the ministry said in a statement, naming just one of the deceased, Adel Saidi.

Since the 2011 revolution that overthrew Zine El Abidine Ben Ali, Tunisia has been rocked by waves of violence blamed on radical Islamist groups that were repressed under the former strongman.

Prime Minister Ali Larayedh last month linked Ansar al-Sharia, the largest such movement in the North African country, with Al-Qaeda in the Islamic Maghreb, and accused it of carrying out the worst "terrorist" attacks since the uprising.

The group is also believed to be supporting jihadists holed up in the remote Mount Chaambi region, along the Algerian border, who have been hunted for months by the Tunisian army.

But Ansar al-Sharia insists it has no ties with foreign groups, while expressing its "loyalty to the principles of jihad and to jihadist groups around the world".

Larayedh's moderate Islamist party Ennahda, which heads the coalition government, has been heavily criticised for not doing enough to prevent the violence that has plagued the country.

But in recent months, following growing calls for action from opposition parties and civil society groups, it has taken a much tougher stand towards the extremists, and Ansar al-Sharia in particular.

The assassination in a street of Mohamed Brahmi on July 25, less than six months after Belaid was killed in similar circumstances, plunged the country into fresh political turmoil.

Thousands rallied in Tunis on Saturday to mark 40 days since Brahmi's murder and to call for the ruling coalition to step down.

The protest was organised by the National Salvation Front, an umbrella group of opposition parties campaigning for the government's immediate departure, with some also calling for the dissolution of parliament.

But Ennahda has rejected those demands, instead proposing a broad-based coalition government and calling for elections on December 17.

As well as its poor security record, the Islamist-led government is accused of mismanaging the economy and failing to improve living standards, which were key grievances of many who participated in the mass uprising that toppled Ben Ali.