Libya on Sunday celebrated two years since the start of the revolt which toppled longtime dictator Moamer Kadhafi, with security forces on high alert due to fears of fresh violence.
The anniversary of the uprising that ended with Kadhafi's killing in October 2011 comes as Libya's new rulers battle critics calling for a "new revolution" and accusing them of failing to usher in much-needed reforms.
Fireworks lit up the night sky in cities across the North African country as warplanes and army helicopters criss-crossed the capital.
Several thousand people converged on squares in Tripoli and the eastern city of Benghazi, waving Libyan flags and playing patriotic songs in a carnival atmosphere, as long convoys of cars blared music out onto streets.
"Where is Kadhafi? Where are the slaves? Let them see all these people and die of frustration!" shouted a young man.
Speaking to hundreds of people in Benghazi, where the uprising began, de facto head of state Mohammed Megaryef paid homage to the "martyrs of the revolution" and the "true revolutionaries" who helped bring down Kadhafi.
He insisted that Libya would not be allowed to become a "base for terrorism" and vowed to end the marginalisation of the east.
Already on Friday, large crowds gathered in the main cities of Tripoli and Benghazi to celebrate the initial February 15, 2011 protest that ignited the revolt two days later.
The authorities took steps to prevent violence on Sunday.
Libya's borders with Egypt and Tunisia were closed on Thursday for four days and all international flights suspended except at the airports of Tripoli and Benghazi, while checkpoints were set up around the two cities.
"We emphasise to our partners our determination that Libya does not become a base for or source of terrorism," said Megaryef, who is president of the national assembly.
Signup to our newsletter and follow us on Facebook and Twitter!
Tahrir Square in Benghazi, where Megaryef was speaking, was set to be the focus of the celebration, with members of the government attending.
Prime Minister Ali Zeidan hailed what he called the Libyan people's rejection of "injustice and tyranny."
"The joy that motivated people in towns and villages on February 15 and 16 has allowed Libyans to prove to the world that they are a civilised people who revolted against injustice and tyranny to gain freedom," Zeidan said.
Opposition groups are demanding that former Kadhafi 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 current regime.
It was unclear who was behind the leaflet and the calls to protest, but Libyan officials and several organisations, including Islamic groups, accuse remnants of the former regime of fomenting protests to "sow disorder and instability."
A number of opposition groups and civil society organisations, including those calling for federalism in eastern Libya, have temporarily suspend their calls to protest, initially planned for Friday, for fear of stoking violence.
"We understand the discontent of the population in certain regions, in particularly Benghazi," which suffered from neglect under the Kadhafi regime, Megaryef said.
"We promise that we will push the government to take the necessary measures to put an end to this marginalisation and improve the living standards of its residents."
The authorities had threatened force against anyone who tried to derail Sunday's festivities.
Last September, Benghazi witnessed an assault by Islamists on the US consulate there that killed US 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, political analyst Suleyman Azqim told AFP.