Interior Minister Fawzi Abdelali resigned on Sunday after coming under fire for the performance of security forces during a surge of violence that has rocked Libya, an official from his office told AFP.
"He submitted his resignation to protest against congressmen criticising the government and to defend the revolutionaries," the official said, referring to former rebels who now form part of the country's security services.
Libyan security services have come in for censure following double car bombings that killed two people on the day Muslims celebrated the feast of Eid al-Fitr a week ago in Tripoli and attacks on several Muslim shrines in the past few days.
The criticism has been led by the newly elected General National Congress, which on Sunday accused the interior ministry's High Security Committee of being lax or even implicated in the destruction of shrines, including those of the Sufi sect.
Islamist hardliners on Saturday bulldozed part of the mausoleum of Al-Shaab Al-Dahman, close to the centre of the Libyan capital.
The demolition came a day after hardliners blew up the mausoleum of Sheikh Abdessalem al-Asmar in Zliten, 160 kilometres (100 miles) east of the capital.
According to witnesses another mausoleum, that of Sheikh Ahmed al-Zarruq, had been destroyed in the port of Misrata, 200 kilometres (125 miles) east of Tripoli.
Hardline Sunni Islamists are implacably opposed to the veneration of tombs of revered Muslim figures, saying that such devotion should be reserved for God alone.
The Sufi sect, which practises a mystical form of Islam and has played a historic role in the affairs of Libya, has increasingly found itself in conflict with Qatari- and Saudi-trained Salafist preachers who consider it heretical.
Prime Minister Abdelrahim al-Kib, meanwhile, defended the work of his government.
"The security organs have done their work effectively, they have foiled several plots and quickly arrested those responsible for acts of sabotage," he told a meeting of the General National Congress, Libya's new authority.
Kib called on the congress to "quickly adopt laws criminalising the carrying of weapons and attacking historical and religious monuments."
Defence Minister Osama Juili told the congress that the main difficulty he faced was "the occupation of strategic military sites by groups of revolutionaries who refuse to join the department of defence."
Dozens of protesters responded to calls on Internet social networks and took to the streets of the capital on Sunday to denounce the destruction of the mausoleums.
"Libya is not Afghanistan!" shouted one woman protester, referring to the destruction by the Taliban of that country's famous Buddha statues at Bamiyan.
The demonstrators marched from Algeria Square in the centre of Tripoli towards the ruins of the Al-Shaab Al-Dahman mausoleum several hundred metres (yards) away, where debris from the demolition was still being cleared away.
Members of the security forces had closed the road off to traffic.
"We reject extremism," "No to the destruction of monuments" and "Islam rejects tombs being profaned" read some of the slogans on placards carried by protesters.
Abderrazak al-Badri, president of the local council in Tripoli, said security was being boosted around other mausoleums and also museums as security forces were alerted to extremist threats against the country's heritage.
"All the museums have been closed, and the main monuments have been protected," he said.
"We carried out the revolution to found a state of law and institutions, not to instal chaos."
The High Security Committee comprises ex-rebels who fought Moamer Kadhafi's forces last year in the conflict that ended in the dictator's death last October.
The rebels had taken over security in the country after the fall of Kadhafi's regime before they were integrated into the ministry of interior's forces.