Moammar Gadhafi was many things over many years: a dashing icon of Libyan revolution, a brazen patron of terrorists, the custodian of vast oil wealth, a dictator whose flamboyance masked grit and guile, and a longtime pariah on the road to rehabilitation in the West.

From his cadre of female bodyguards to his penchant for pitching a tent on foreign visits, he was an object of fascination, ridicule and revulsion.

Now, in perhaps his final reinvention, Gadhafi is an apocalyptic figure, the dispenser of terrible bloodshed who seeks to keep power four decades after he ousted King Idris in a coup when he was an army captain.

In sending warplanes and helicopters against protesters, and in threatening to turn Libya into "hell," Gadhafi has spurned even the facade of legitimate leadership amid a widening revolt that seems close to toppling him. Yet he does not appear aware of that, or to care, thereby subjecting the fate of Libya's 6 million people to the foibles of one man's narcissism.

Once known as "Brother Leader of the Revolution," Gadhafi again stands at an intersection of brutality and buffoonery.

The man lampooned for his eccentricities is the same one who funded Italy's Red Brigades and the Irish Republican Army, and whose regime was implicated in the bombings of Pan Am Flight 103 over Lockerbie, Scotland, and a French airliner over the Niger desert in the late 1980s.

Some examples of Gadhafi's eccentricities:

— He has shown a penchant for conducting state business in tents, pitching them in Moscow, Paris and Rome, among other locales. For a September 2009 visit to New York to give a speech at the United Nations, he tried and failed to make camp in Manhattan's Central Park and Englewood, New Jersey. The white cloth tent, lined with a tapestry featuring camels and palms, later appeared in Bedford, New York, in a courtyard of a stone manor house on property owned by real estate magnate Donald Trump, who hinted that he had been tricked into renting his land. Politicians eventually declared Gadhafi unwelcome, and Bedford issued a stop-work order.

— Gadhafi's personal bodyguards, known as the Amazonian guard, consisted of young women said to be martial arts experts. They often carried machine guns and sometimes wore military-style uniforms with matching camouflaged headscarves. In 2006, Nigerian authorities stopped dozens of Gadhafi's bodyguards, including members of the female corps, from entering Abuja, the capital, with weapons in a dispute that lasted hours and saw the exasperated Libyan leader storm away from the airport on foot before a compromise was reached.

— Dapper and handsome in his youth, he cultivated an increasingly flamboyant appearance over the years, donning garish military uniforms with braids and huge, fringed epaulettes or flowing, colorful Bedouin robes and clothing with African patterns, along with sunglasses and fly whisks. His hair grew scruffy and he sported a goatee and scraggly mustache. In his first televised appearance after protests broke out in Libya, he appeared with an umbrella and a kind of hunter's cap with flaps over the ears.

— In a 2009 speech at the United Nations, he rambled about jet lag, the assassination of U.S. President Kennedy and a proposal that the Israeli-Palestinian conflict be settled by creating one country called "Isratine," where the two peoples live together. He also tore up a copy of the U.N. charter in front of the delegates, criticizing the Security Council as a form of global feudalism. "It should be called the 'terrorism council,'" he said. On Saturday, the Security Council imposed sanctions on Gadhafi, his children and top associates to try to stop his attacks on the opposition.

— A 2009 U.S. diplomatic cable released by the website WikiLeaks cites Gadhafi's heavy reliance on a Ukrainian nurse — described as a "voluptuous blonde" — and his intense dislike of staying on upper floors of buildings, aversion to flying over water and a taste for horse racing and flamenco dancing. On Saturday, Ukraine's Segodnya daily newspaper reported that the nurse, 38-year-old Halyna Kolotnytska, was planning to flee the violence in Libya and return home.

The cable said that while "tempting to dismiss his many eccentricities as signs of instability," Gadhafi was "a complicated individual" who has stayed in power "through a skillful balancing of interests and realpolitik methods."

Gadhafi suffers "the sense of mission and the sense of personal power that someone has when they've been at the top for a very long time with few people, if anybody, seriously contradicting them," said Richard Dalton, a former British ambassador to Libya and Iran. He said the Libyan has the classic delusion of absolute rulers who believe, even as citizens abandon them, that the people are at fault.

"He may do something that one calls crazy, but it flows from the internal history and logic of the personality and his experiences," Dalton said.

Born in a Bedouin tent, Gadhafi has known power for virtually his entire adult life. Cuba's Fidel Castro and North Korea's Kim Il Sung are among the few leaders to have held it longer. He took control of Libya in 1969, just weeks after astronauts landed on the moon. U.S. President Richard Nixon was in office, and so was Egypt's Gamal Abdel Nasser, whose pan-Arab nationalism inspired the young Libyan.

"Libya is leading the continents, even Europe," he said last week in one of several diatribes. "No one knew Libya before Gadhafi."

Black-and-white film of Gadhafi in his early years at Libya's helm gives a hint of the enigma he would become. The slender officer sits at a desk, awkwardly holding pen to paper, while answering an interviewer's questions in halting English. He smiles often, but it is hard to tell whether it is from shyness, irreverence or even bewilderment at being propelled to such heights in his mid-20s.

A maverick to the last, Gadhafi is devising an endgame different from the narratives unfolding elsewhere in the Middle East and North Africa, where autocrats have fumbled for a formula to resist or defuse protests whose calls for change splintered a decaying order.

All tried force, but unlike Gadhafi, they did not have the means or will to declare war on their own citizens. Tunisia's president fled, Egypt's president resigned under pressure, Bahrain's king seeks to negotiate, and support for Yemen's leader is eroding.

Other besieged leaders in retreat developed the same skewed sense of infallibility, but their institutions and sense of accountability, however flimsy, exercised some restraint. Gadhafi, by contrast, built authority on family and tribal loyalty, buttressed by personal militias while undercutting his own military in case it might challenge him.

"He believes in his world. He thinks of himself: 'I am much higher than presidents, than kings,'" said Mustafa Abushagur, a Libyan who is president of the Dubai campus of the Rochester Institute of Technology. For 40 years, Abushagur said, Gadhafi's acolytes have told him: "You are the greatest."

This personality cult in the desert degraded the traditional idea of a nation state in Libya, which as a former Italian colony was already a shaky patchwork of territory. The country had no constitution, but officially followed Gadhafi's "Green Book," a treatise that condemns parliaments, plebiscites and other features of Western-style democracy.

In Gadhafi's view, "direct democracy" stemmed from so-called people's committees, though his meandering socialist and Islamic rhetoric did little to hide the fact that he alone was in charge. He was also a self-styled and mostly unsuccessful champion of Arab and African solidarity, and his denunciations of Israel and imperialism resonated in developing countries and radical circles around the world.

Journalist Paul Barker described attending a 1970s conference in Tripoli.

The Libyan leader was "a film star of the revolution. He was bright and slim in a safari suit," Barker wrote in the London Times. "He was like the lead in 'The Desert Song.' The fraternal delegates clustered round him like autograph-hunters. Libya had money to spend, after all, on all kinds of activities."

With celebrity status came callousness. In 1989, during one of Libya's periodic anti-Italian demonstrations, an Italian worker was shot and set on fire by a mob. Italian TV interviewed Gadhafi as he sat in a black leather jacket inside a tent. He said through an interpreter that he had not heard about the slaying, but added: "I hope he had life insurance."

Libya's oil wealth was fuel for his follies, and he dispatched troops in an ill-fated attempt to prop up Ugandan dictator Idi Amin, later a guest in exile. U.S. President Ronald Reagan dubbed him the "mad dog of the Middle East" and U.S. airstrikes targeted Gadhafi in 1986 after a bombing at a Berlin disco that killed three people, including two American soldiers.

Comment on this story

The Lockerbie bombing led to international sanctions against Libya, which began to emerge from isolation when it renounced terrorism and weapons of mass destruction and agreed to pay compensation in terrorist attacks. Western leaders courted energy-rich Libya, despite some unsavory moments.

He sponsored an annual human rights award in his name. Recipients included Venezuelan President Hugo Chavez and former Prime Minister Mahathir Mohamad of Malaysia, both accused by critics of curbing civil liberties.

Gadhafi last week delivered a defiant speech near a sculpture of a golden fist crushing a U.S. fighter jet.

"I don't see him surviving," said Dalton, the former British ambassador. "I suppose you could say that in Shakespearian terms, his vanity is his fatal flaw."