Martyrs Square in central Tripoli was transformed into a spectacular street party with people pulsing to traditional music that thumped out of speakers, and fireworks, fountain and light displays cascading over the sea.
The show of support appears to be a carefully choreographed riposte to an exiled opposition congress held two months ago in London, which vowed to embark on a peaceful campaign to topple the regime.
A bespectacled al-Qadhafi, dressed in an untucked sleeveless military shirt and looking relaxed, appeared late in the evening to receive the adulation of the crowds from a balcony and accept gifts from supporters.
He was handed a document entitled "the charter of fidelity", said by the organisers to have been signed "by the Libyan people", in which they "forge allegiance and swear fidelity to their guide".
The mercurial leader, who aged just 27 toppled King Idris in a coup d'etat on 1 September, 1969 with other military officers, was expected to address the throngs of people gathered in Libyan capital on Thursday.
The massive event brought together all types from across Libya's diverse spectrum into the capital, from traditionally dressed nomads, women in black veils, to trendily dressed young men in T-Shirts.
In a sign of Libya's gradual re-acceptance by the international community, even US oil companies - back in Libya after decades of absence - have put up banners in the streets to congratulate al-Qadhafi and the people.
One such banner from a western firm "congratulates Libyans and Muammar al-Qadhafi on the occasion of the anniversary of the revolution".
Al-Qadhafi brought his country in from the cold after years of isolation by renouncing weapons of mass destruction, sparking investment interest and encouraging a stream of foreign leaders to beat a swift path to his tent.
Al-Qadhafi, 63, who has never promoted himself higher than colonel or given himself an official title other than "guide of the revolution", is the longest serving leader in the Arab world.