Libya on Sunday will mark the second anniversary of the uprising that toppled the regime of strongman Moammar Gaddafi, amid fears of fresh violence and calls for demonstrations across the country.
The government has already taken a series of measures to contain any attempt by supporters of the former regime to "sow chaos" amid anger from protesters who accuse the new rulers of failing to push for reform.
Some critics of the government have even called for a "new revolution" as they denounce the power of ex-militias which helped to end more than four decades of rule by Gaddafi who was killed in October 2011.
Opposition groups are also demanding that former regime officials be barred from holding public office, and a leaflet circulated in Tripoli calls for a "popular revolt" and civil disobedience to bring down the regime.
It is unclear who is behind the leaflet and the calls for protests, but Libyan officials and several organisations, including Islamic groups, accuse remnants of the former regime of fomenting protests to "sow disorder and instability."
The authorities are fighting back by requiring special permits for "peaceful protests," and threatening force against those who try to derail the festivities.
The security forces have been put on high alert.
Prime Minister Ali Zeidan also announced the closure of Libya's borders with Egypt and Tunisia from Thursday for four days, and that international flights will be suspended at all airports except Tripoli and second city Benghazi.
Lufthansa and Austrian Airlines have also suspended flights to Libya during the anniversary commemorations.
Zeidan called the Libyan measures "preventive," to avoid "any bid to undermine Libya's security and disrupt celebrations marking the anniversary of the revolution."
Checkpoints have been set up across the capital and in eastern Benghazi, cradle of the "February 17 revolution" of 2011.
However residents of Benghazi – which has been hit by Islamist-linked violence targeting international agencies and diplomatic missions – have set up neighbourhood watches.
The city's deadliest attack was a September 11 assault on the US consulate there that killed ambassador Chris Stevens and three other Americans.
"Security is one of the challenges the country faces, especially the proliferation of weapons and the escape of thousands of prisoners" during the revolution, according to political analyst Suleyman Azqim.
"The new authorities are faced with immediate social demands that prevent them from implementing medium- or long-term economic or security strategies."
Despite Libya holding its first free elections in July last year, Azqim said the country is not yet politically mature after four decades of dictatorship under Gaddafi.
The fear of fresh violence is strong among both Libya's dwindling foreign community and Libyans who have rushed to stock up on food and domestic gas.
"We must be ready. One never knows what can happen, particularly since there is no stability in the country and the government is unable to impose its authority," said one, Murad Abuajila al-Majbri.
Another man, Abdelmalek Haj, said he had moved his family out of the capital.
"I am not sure of the threats, but I prefer to do what is necessary because no one knows what will happen with the weapons that are in people's hands," he said.
Meanwhile there is no official programme to mark the anniversary. "It is up to the people to celebrate as they wish," the premier said.