One September morning in 1969, Libyan army units led by Captain Moammar Qaddafi converged on Tripoli, overthrowing the monarchy and warning Libyans that any resistance would be "crushed ruthlessly and decisively."
Captain Qaddafi was promoted to colonel the following week and has since ruled Libya with a mix of flamboyance, autocracy and ruthlessness ever since.
Starting last week Libyans have put Col Qaddafi to the test, mounting protests across the country to demand his departure. Hundreds of Libyans have been killed by security forces.
Unconfirmed reports leaking through a media blackout depict growing violence, with gunfire in Tripoli, government buildings aflame and protesters shot dead in the streets. Protesters have gained control of eastern cities where revolt originally broke out.
Protests have rippled through Arab countries recently, pushing leaders in Tunisia and Egypt to resign. Col Qaddafi, however, has vowed to retain power or die trying.
"I will not leave the country, and I will die as a martyr," he said in an televised address last night. Banging his fist on the table, he blamed the revolt on "cowards and traitors" and said that he had brought glory to Libya.
Col Qaddafi was born in 1942 to a horse and camel trader. He did his school homework by lamplight and was enchanted by Arab nationalist sentiment.
"Everything was happening," Col Qaddafi told TIME Magazine in 1973. "The Suez Canal had been nationalised by the Egyptians in 1956; Algeria was fighting for its independence. The monarchy had been overthrown in Iraq. In Libya, nothing was happening. We had only a simple old king, a fool of a crown prince and a corrupt government."
In 1969 Col Qaddafi took action, leading fellow army officers to oust the king. Industries were nationalised, while political parties were abolished and replaced with a system of committees.
In practice, Mr Qaddafi has wielded near-total power and set Libya's agenda as "Brother Leader and Guide of the Revolution", juggling political factions and gaining the allegiance of tribes that make up Libyan society.
In the name of pan-Arabism he tried abortive unions with Egypt, Syria and Tunisia. In the name of African solidarity he sent millions of dollars to sub-Saharan countries.
Famously, Col Qaddafi's largesse also extended to numerous militant groups and liberation movements, earning him the ire of western countries and US and UN sanctions.
Tension spiked in 1988 after Pan Am flight 103 was brought down by a bomb over Lockerbie, Scotland, killing 270 mainly Americans and British in an attack blamed on Libyan agents.
At home, Col Qaddafi brought deadly force against opponents. The early years of his rule featured the public hangings of dissidents, while in the 1990s he decimated an Islamist revolt. In 1996, guards at Tripoli's Abu Salim prison shot more than 1,000 rioting prisoners.
Sanctions were lifted after Libya surrendered suspects in the Lockerbie bombing and in 2003 renounced its quest for nuclear weapons. Meanwhile, the economy was liberalised and ties with western countries were restored.
That rapprochement is now in ruins as Col Qaddafi cracks down on protesters, bringing condemnation from western countries and the United Nations.
It is unclear whether the revolt will unseat Col Qaddafi. But his grip on power has weakened in recent days, as protests have grown and some tribes and members of his regime have publicly withdrawn support for him.
Years from now, Libyans will remember the larger-than-life personality who once told an Arab League summit that he was "the dean of Arab rulers, the king of kings of Africa and the imam of Muslims."
They will remember the trademark showmanship of Col Qaddafi's foreign trips: his Bedouin tent, female bodyguards and costume-changes involving a variety of African-themed ensembles.
But they will also remember that behind the theatrics was a tyrant.
A 2008 report by Freedom House classed Libya as a "worst of the worst" human rights offender. A US State Department report the same year accused Libyan security services of torture.
Above all, Libyans will remember the events of this month: protests in the squares, snipers on the rooftops and slain bodies in the streets. They will remember the leader who when urged to step down promised his people "rivers of blood" - and delivered.