Libyan Defence Minister Mohammed al-Barghati resigned on Tuesday, but rescinded his decision several hours later at the request of Prime Minister Ali Zeidan, the government said.
"The chief of the government asked the defence minister to rescind (his decision) and the minister said he understands, given the circumstances the country is going through, that he should continue in office," a statement said.
Barghati never actually submitted a letter of resignation but had said earlier he felt compelled to resign because he could not "accept the policy of force used by armed groups in our new state."
Libya is undergoing a new political crisis, as gunmen, mostly former rebels who fought to oust dictator Moamer Kadhafi, have besieged two ministries for the past week.
They have been demanding that Kadhafi-era officials now serving in government be sacked, with some even calling for Zeidan to go.