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 Tunis northern suburb by the anti-terrorist squad, the source told AFP.
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.
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.
Also Read
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.
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 departure.