Tunisia's army General Rachid Ammar, who refused orders to crush the 2011 uprising that toppled ex-president Zine El Abidine Ben Ali, has announced he is stepping down.
"I have asked to exercise my right to retire, because I have easily reached the age limit," said the 67-year-old general in comments broadcast on Tuesday by Tunisian radio.
Ammar, who first made the surprise announcement on Monday evening on private TV channel Ettounsiya, said he had presented his request to President Moncef Marzouki who accepted it.
His decision comes at a time of heightened security concerns in Tunisia following the discovery of Al-Qaeda-linked groups along the border with Algeria.
There has been growing criticism of the army's failure to root out dozens of Islamist militants it has been pursuing in the Mount Chaambi region since December.
At least two soldiers have been killed and some 20 injured by homemade bombs planted by the jihadists who the government says are veterans of the Islamist rebellion in northern Mali with links to Al-Qaeda in the Islamic Maghreb (AQIM).
The role of the army during the uprising was hailed by Tunisians because troops refused to fire on demonstrators.
General Ammar also joined street protesters to tell them that the military backed their demands.
He was also the only official present at the funeral of Chokri Belaid in February, after the slain secular politician's family asked that representatives of the Islamist-led government stay away.
Marzouki on Monday honoured the general and denounced those who have criticised the army's leadership during a military ceremony in Carthage, but he made no mention of Ammar's retirement or replacement.