Libya's deputy prime minister Awadh al-Barassi announced his resignation late on Saturday, slamming the government as "dysfunctional" and unable to end a wave of violence.
Barassi made the surprise announcement at a news conference in the restive eastern city of Benghazi, amid growing public anger over widespread violence and a spate of political assassinations.
His resignation came just days after Prime Minister Ali Zeidan said he was shelving plans to carry out a cabinet reshuffle to improve the government's response to the unrest.
Blasting a "dysfunctional government", Barassi said he was stepping down due to "a security breakdown and assassinations linked to the cabinet's policies", state-run Lana news agency reported
Signup to our newsletter and follow us on Facebook and Twitter!
He said the government had failed to win the people's trust and provide state agencies with the resources needed to achieve development goals.
Zeidan expressed "surprise" but said he accepted Barassi's resignation, Lana added.
On Monday, Zeidan said he would restore the feared Internal Security Agency which helped keep the ousted dictatorship of Moamer Kadhafi in power for decades, to try to stem the violence.
He also said he would reshuffle his cabinet but, on Wednesday, he said he was shelving the plans and would instead form a "crisis committee".
Since Kadhafi's overthrow in 2011, the Libyan authorities have struggled to reestablish order and form a professional police and army.
There has been a spate of attacks, particularly in the east, some of which have struck several Western targets and have been blamed on hardline Islamist groups.