When he pronounced himself the "king of kings" on the African continent, Moammar Gadhafi was widely seen as a buffoon and a megalomaniac.
But behind the absurd titles, behind the crown and sceptre that were awarded to him by his hand-picked collection of African tribal monarchs, Col. Gadhafi had a profound impact on Africa. And for better or worse, he will leave a vacuum behind him on the African landscape if he is toppled from power in Libya.
Col. Gadhafi was the last major global leader who promoted the dream of pan-African unity. He had his own self-interested reasons for this quixotic campaign, of course, since his own ambition was to become the powerful ruler of a new United States of Africa. But his disappearance from the political stage would remove the last remaining enthusiast for a European-style political union in Africa.
"Without Gadhafi, the pan-African movement is dead," said Laura Seay, a political scientist at Morehouse College in Atlanta who specializes in African politics.
"He was the only prominent voice driving that movement. He was keeping those ideas alive. There's nobody else with the financial resources available."
Under his grandiose ambitions, the United States of Africa would have its own common army, its own passport, and its own currency (to be named, he said solemnly, "the Afro").
There was little chance that this scheme could succeed in a badly divided continent, and there was little practical support for his ideas at the African Union, even when he served as the AU chairman from 2009 to 2010. But by tirelessly marketing this idea, he kept alive the dream that Africa could overcome its differences and find some form of unity. After him, the dreams will be smaller.
Col. Gadhafi, one of the wealthiest leaders on the continent, did not hesitate to use Libya's vast oil money to buy political influence across Africa. This money, in turn, helps to pay for peacekeeping missions, humanitarian aid, infrastructure projects, political organizations, and support for fragile states.
In his drive to transform the African Union into a single government under his personal dominance, he became one of the AU's biggest benefactors. Libya provided 15 per cent of the AU's membership dues. It also paid for the dues of many smaller and poorer countries. If his 42 years of authoritarian rule are ending, the AU will struggle to keep its financing intact.
"It would change the African Union's dynamics completely," Prof. Seay said. "The AU would become less effective. He's been such a key player in the AU. What will it mean for peacekeeping in Somalia and Darfur? Those peacekeeping missions are already hanging by a thread - they're already so under-equipped and under-staffed."
The AU peacekeeping force in Somalia, with its 8,000 troops battling against the Islamic radicals who threaten to seize control of the war-torn country, could be weakened if the AU loses the money that Col. Gadhafi provided. A similar peacekeeping mission in Darfur, whose 20,000 troops are supported by the AU and the United Nations, could be similarly jeopardized if the AU loses its Libyan money.
Beyond the peacekeeping missions, a host of smaller African countries have become dependent on Col. Gadhafi as a source of aid money, infrastructure projects and military support. Fragile states such as Chad and the Central African Republic have needed Libya's support when they were threatened with coups. Poorer countries such as Liberia, Mali and Niger have relied on Libya for financial support and investment. Libya has won praise for providing humanitarian aid to the Darfuri refugees in Chad, and for helping to forge a ceasefire between Chad and Sudan.
Most of his donations and loans, certainly, were intended to advance his personal ambitions. Earlier in his career, Col. Gadhafi had campaigned for pan-Arab unity, seeing himself as a "man of history." But when Libya was isolated on the global stage as a result of the sanctions imposed on it for its support of international terrorism in the 1980s and 1990s, he became furious that the Arab nations seemed indifferent to him. He turned, instead, to Africa, where his support seemed greater.
"After moving on from his dream of pan-Arab leadership, Gadhafi funnelled billions of dollars into cultivating relationships in sub-Saharan Africa that would facilitate his leadership of the African Union," the U.S. embassy in Tripoli reported in 2009 in a confidential cable obtained by WikiLeaks.
Col. Gadhafi opted to use "dinar diplomacy" - a reference to the Libyan currency - to create a "new and larger sphere of influence," the embassy said in the cable.
It described how the Libyan dictator had ordered his personal designers to incorporate African maps and images into his vast collection of clothing, including a large green Africa-shaped brooch, a camouflage-style tunic with Africa-shaped patterns, and a jersey emblazoned with portraits of famous African leaders.
Most Libyans still saw themselves as Arabs, but Col. Gadhafi worked ceaselessly to portray his country as African, the cable said. "A domestic propaganda campaign designed to represent Libya as an African state was also undertaken: billboards and larger-than-life murals depict Gadhafi emerging, messiah-like, from a glowing green Libya into an embracing African continent."
Despite the long-standing conflicts between Washington and Tripoli, the U.S. diplomats actually saw Col. Gadhafi as a constructive and useful player on some African issues. "When approached with appropriate deference, Libya can be an effective actor - leveraging support and connections on the continent to secure our foreign-policy interests, as it has done (to an extent) in Chad, Sudan and Somalia," the embassy cable said.
If the Libyan strongman now disappears ignominiously from the stage, one of the biggest winners will be China. Until now, Libya was one of the few countries that could challenge Beijing's mounting influence in Africa. Libya was one of the few powers with enough money and ambition to offer an alternative to China as a source of investment and financing for African nations.
If the long-ruling dictator is finally toppled, Libya's ambitions are likely to become much smaller and more modest. In the aftermath, China could emerge as an even stronger power on the African continent.