The good news about last weekend's election in Libya, as relayed by the western media, was that the "Islamists" were defeated and the Good Guys won. The real good news was that democracy in the Arab world is still making progress, regardless of whether the voters choose to support secular parties or Islamic ones.
The Libyan election was remarkably peaceful, given the number of heavily armed militias left over from the war to overthrow the Gadhafi dictatorship that still infest the country. Turnout was about 60 per cent, and Mahmoud Jibril, who headed the National Transitional Council during last year's struggle against Gadhafi, won a landslide victory.
Jibril, whose National Forces Alliance was a broad coalition of diverse political, tribal and ethnic groups, denied that it was a "secular" party -- a necessary posture in a deeply religious and conservative society like Libya's -- but it certainly was not an Islamic party. Yet it won 78 per cent of the vote in Tripoli, the capital, and 58 per cent even in the oil-rich east.
The explicitly Islamic parties, the Justice and Development Party (Muslim Brotherhood) and Al-Watan, did far worse than they expected, getting barely 20 per cent of the vote in Benghazi, the big city in the east. But they should not have been surprised.
In Tunisia to Libya's west and Egypt to the east, the Muslim Brotherhood was the mainstay of resistance to the dictatorships for decades, and it paid a terrible price for its bravery. It was natural for voters in those countries to reward Islamic parties when the tyrants were finally overthrown. Gadhafi was more ruthless and efficient in crushing all opposition in Libya, and the Muslim Brotherhoood had scarcely any local presence.
So Libya gets a "secular" government while Tunisia and Egypt get "Islamic" governments -- but the point is that they all get democratically elected governments and stand a reasonable chance of becoming countries that respect human rights and the rule of law. Tunisia has already made that transition, and Egypt, with one-third of the entire population of the Arab world, is heading in that direction too.
The relevant question is not whether a party is Islamic; it's whether it is democratic. The distinguishing feature of the Islamic parties that have emerged in post-revolutionary Arab countries is that they have almost all chosen barely modified versions of the name of Turkey's ruling Islamic party, the Justice and Development (AK) Party.
The AK Party has governed Turkey with remarkable success for the past 10 years. The economy has flourished, the army has finally been forced to stop intervening in politics, and you can still buy a beer almost anywhere in Istanbul.
AK is a socially conservative party, of course, like Germany's Christian Democratic Party or the Republican Party in the United States. But like those parties, it respects the constitution, civil rights and the voters' choice. It's hardly surprising that its leader and Turkey's prime minister, Recep Tayyip Erdogan, was greeted as a hero when he visited Cairo shortly after the revolution.
There is no good reason to believe Islamic parties in Arab countries will behave worse than "secular" parties, any more than we would worry if a "secular" party in Germany were about to lose to a "Christian" party. In fact, the Christian Democratic Party currently leads the coalition government in Germany, and civil rights are still safe.
The western prejudice against Islamic parties (and local prejudice as well) comes from a confusion between Islamic and "Islamist" groups, the latter being the English word for fanatical groups that reject democracy and advocate violent jihad against infidels and "heretical" Muslims. This confusion, sad to say, is often deliberately encouraged by western and local interests that really know better, but want to discredit those who oppose them.
It didn't work in Egypt, where the Muslim Brotherhood's party won both the parliamentary and the presidential elections. This did not please the Supreme Council of the Armed Forces and its allies from the old regime, and they arranged for the Egyptian Supreme Court (whose members were all appointed by the old regime) to dismiss the new parliament on a flimsy constitutional pretext just two days before the presidential election last month.
Then, as the voters were actually casting their ballots, the army also stripped the office of the president of its right to control the armed forces, gave itself the right to impose new laws, and declared that it would choose the group who write the new constitution. It was a coup implicitly justified by the rise of the "Islamic menace" -- and some secular Egyptian politicians, disgracefully, have gone along with it.
Egypt's newly elected president, Mohammad Morsi, has refused to accept the army's decrees, and a delicate game is underway in Cairo in which he is trying to discredit the soldiers and gradually drive them back into their barracks without risking an open confrontation that could trigger an actual military coup. He will probably win in the end, because the army knows that the masses would promptly be back in Tahrir Square if it did try a coup.
And if Egyptians don't like what their Islamic government does, they can always vote it out again at the next election.
Gwynne Dyer is a London-based independent journalist whose articles are published in 45 countries.