The celebrations included military bands, 400 dancers depicting scenes from Libya's history, aerobatic aeroplanes and fireworks displays.
Lights adorn buildings across the city, walls in the old town have been freshly whitewashed and rows of green Libyan flags flutter over its dusty streets.
Portraits of Gaddafi, who once described himself as "leader of the Arab leaders, the king of kings of Africa and the imam of the Muslims," adorn billboards and buildings across the city, his features sometimes traced out in colourful neon lights.
While foreign companies are back in Libya, searching for oil and vying for contracts to build roads, railways, phone networks and schools, Gaddafi remains a politically controversial character.
The US and Britain were angered recently by the "hero's welcome" Tripoli gave Abdel Basset al-Megrahi, the former Libyan agent who was freed by Scotland last month from a life sentence for the 1988 Lockerbie bombing that killed 270 people.
Critics in London have alleged that al-Megrahi's release was linked to oil contracts in Libya.
Britain's The Sunday Times newspaper reported that the government had decided two years ago that it was in the country's "overwhelming interest" to free him.
The British government has denied the claims and said it released al-Megrahi, the only person convicted over the bombing, on compassionate grounds as he is dying of cancer.
European leaders are expected to stay away from Libya's celebrations of Gaddafi's rule, but other world leaders will attend.
|Organisers said the event in Tripoli rivalled that of an Olympic opening ceremony [AFP]
Hugo Chavez, Venezuela's president, along with a number of African leaders including Robert Mugabe, Zimbabwe's president, and Omar Hassan al-Bashir, Sudan's president, who are expected to be in town for an African Union (AU) summit, will join the events.
Libya currently chairs the 53-member AU bloc.
Gaddafi has made Africa the focal point of his return to the international stage, giving aid to poorer African countries and campaigning for a "United States of Africa" with a common army and currency.
But at home, proposed reforms have stalled, political parties remain banned and Gaddafi staunchly defends his system of grass-roots government which critics say is a cloak for authoritarian rule.
Omar al-Turbi, an expert on US-Libyan relations, told Al Jazeera: "As much wealth as there is in Libya, I haven't really seen it trickle down to the average man. There is still high unemployment and the standard of living for many is not elevating.
"It is not that the regime does not have the intention to help the people, I think it's the system trying to sort itself form being socialist for a long time to becoming a capitalistic, free-enterprise system."
Al-Turbi said: "People are really frustrated about their level of income and their level of livelihood. Six years ago it was very bad, people can now trade and own and build without the hesitation that the government is going to seize their property or businesses."
Seif al-Islam, Gaddafi's son and heir, has accused a "civil servants' mafia" of opposing reforms.
Gaddafi came to power in 1969, overthrowing Libya's then leader, the Western-backed King Idriss.