Libya is not Egypt, or Tunisia. Unlike its two neighbors, Libya is a major oil-producer. And it has been ruled for 42 years by a loose-cannon leader, Muammar Gaddafi, who has flip-flopped through a mix of nationalism, authoritarianism, pseudo-socialism, his own brand of Islam, anti-imperialist rhetoric, support for terrorism, and finally neoliberalism and free-market privatization.

Now facing an uprising that threatens to topple him, Gaddafi, in a televised speech Tuesday night, called the protesters “cockroaches” or “rats and mercenaries” who deserve the death penalty. He urged his followers to “cleanse Libya house by house” unless the protesters surrender.

That night, Gaddafi’s interior minister, Abdel Fattah Younes al Abidi, resigned and announced his support for the opposition. Al-Jazeera aired video footage showing Abidi at his desk reading a statement urging the Libyan army to join the people and their “legitimate demands.”

Al Abidi told CNN on Wednesday that Gaddafi had ordered the people of Benghazi – Libya’s second largest city, now reportedly under control of the opposition – gunned down with machine guns, and said he had argued with Gaddafi’s intention to use airplanes to bomb that city.

In the eastern town of Al Bayda, resident Marai Al Mahry told Reuters by telephone that 26 people including his brother had been shot dead overnight by Gaddafi loyalists.

“They shoot you just for walking on the street,” he said, sobbing uncontrollably as he appealed for help. Protesters were attacked with tanks and warplanes, he said.

“The only thing we can do now is not give up, no surrender, no going back. We will die anyways, whether we like it or not. It is clear that they don’t care whether we live or not. This is genocide,” said Mahry, 42.

In the capital, Tripoli, news reports said government forces were shooting protesters in the streets, while planes dropped “small bombs” and helicopters shot from above. “It was an obscene amount of gunfire,” said one witness, according to the New York Times. “They were strafing these people. People were running in every direction.”

Estimates of the deaths in the week of protests so far range as high as 1,000.

United Nations High Commissioner for Human Rights Navi Pillay called on Tuesday for an international investigation into Libya’s attacks on protesters, saying they may amount to crimes against humanity. She said, “The callousness with which Libyan authorities and their hired guns are reportedly shooting live rounds of ammunition at peaceful protestors is unconscionable.”

The Libyan people are “tired of corruption,” unemployment and of having their rights ignored, Pillay said.

The UN Security Council, also on Tuesday, condemned the violence and said those responsible must be held to account.

The Arab League has suspended Libya’s participation.

On Wednesday, President Obama condemned the use of violence against protesters and said the U.S. was speaking with other countries about possible actions. But the U.S., because of its adversarial relationship with Gaddafi, is considered to have little leverage with him. And, as in the case of Iran’s Ahmadinejad regime, anything the U.S. does can give Gaddafi more excuse to claim that the protests are foreign-backed.

In addition to the interior minister, other top officials have quit, including envoys to the United States, India and Bangladesh. The ambassador to India, Ali al-Essawi, told Reuters, “The fall of Gaddafi is the imperative of the people in streets.”

News reports indicate that eastern Libya, where Benghazi and most of Libya’s oil is located, is no longer under Gadaffi’s control. Long-standing opposition circles are said to exist there. They include tribes who resent mistreatment by Gaddafi. But in the capital, Tripoli, and elsewhere in the country it is not clear whether or to what extent the protests have an organized leadership.

This seems to echo Libya’s past as three separate entities: Tripolitania, Fezzan and Cyrenaica. They were unified in 1951 when Libya gained independence from British-French control. (Libya was an Italian colony between 1911 and World War II. Britain and France took over after Allied forces ousted Italy in 1942.) Cyrenaica is now the eastern part of Libya.

Gaddafi took power in a 1969 coup that ousted Libya’s monarch, King Idris, in the era of Arab nationalist leaders who used anti-imperialist and socialist rhetoric along with political repression. He does not hold a formal government position, but is officially referred to as “Guide of the First of September Great Revolution of the Socialist People’s Libyan Arab Jamahiriya” (people’s state).

Gaddafi implemented a top-down mixture of nationalist, socialist-seeming and authoritarian policies. Political parties were banned in 1972 and independent nongovernmental organizations were suppressed. No trade unions are known to exist outside of the government-linked National or General Trade Union Federation.* Thus there are said to be few national structures that could provide a firm basis for a democratic movement.

Internationally, Gaddafi long presented himself as an anti-imperialist, with provocative rhetoric. His government was also implicated in numerous violent incidents in other countries. This provided President Reagan with a rationale for sending war planes to bomb Libya in 1986, killing more than 100 people including Gaddafi’s daughter. UK Guardian commentator Brian Whitaker noted that Gaddafi’s speech Tuesday cited the fact that his regime had withstood bombing “by 170 aircraft under the leadership of nuclear countries like America, Britain and NATO” – implying that because they failed, today’s Libyan rebels cannot succeed.

Libyan agents were charged in the 1988 bombing of Pan Am flight 103 over Lockerbie, Scotland, killing 270 people.

In 2003, after years of sanctions imposed by the U.S. and Britain, Gaddafi made a deal with them, saying he had given up terrorism and pursuit of nuclear, chemical and biological weapons, and admitted responsibility for the Lockerbie attack, agreeing to pay compensation to the victims’ families.

Libya, the fourth largest country in Africa, has recently ranked as having the highest Human Development Index and fourth highest gross domestic product per capita in the continent, largely due to its oil industry and small population. Libya has only 6.4 million people, in contrast to Egypt, for example, which has a population of over 80 million in a much smaller territory. These factors are one reason why more than a million of Libya’s residents are migrants from other African countries.

Libya is a major world oil producer, rank seventh among OPEC members.

Yet Libya also has the highest unemployment rate in the region, at 21 percent.

Oil was largely nationalized in the early 1970s. But since 2003, when Gaddafi reconciled with the U.S. and other Western countries, he has adopted neoliberal economic policies, including privatization of oil and other formerly publicly owned industries and services.

Political scientist Benjamin Barber says media portrayals of Gaddafi as a buffoon or maniac are wrong and misguided. He calls Gaddafi a “crafty and intelligent survivalist.”

Whether he will hold onto power now remains to be seen.

*Updated 2/24/11 to add mention of government-linked trade union federation, which is “an integral part of the political system” according to the International Trade Union Confederation. Foreign migrant workers, a substantial portion of Libya’s workforce, are barred from membership.

Photo: Anti-regime placards and images are placed in front of the courthouse in Benghazi, Libya, in the early hours of Tuesday, Feb. 22. Writing on poster of Libyan leader Muammar Gaddafi in Arabic reads, “A flood of freedom, topple the idols of oppression, 42 years of repression and darkness, in four days the regime fell, toppling the human idols is a religious and national duty.” (AP/Alaguri)