Ivory Coast's former president Laurent Gbagbo will appear before the International Criminal Court within days to face charges of crimes against humanity, including murder and rape, the first former head of state to be tried by the ICC since its inception in 2002.

Gbagbo, 66, was arrested and flown overnight from Ivory Coast to the Netherlands, where he was transferred to a detention centre in The Hague.

About 3,000 people were killed and more than a million displaced in a four-month civil war in Ivory Coast after Gbagbo refused to cede power to Alassane Ouattara in last year's election.

The court charged Gbagbo with individual criminal responsibility, as indirect co-perpetrator, for four counts of crimes against humanity -- murder, rape and other forms of sexual violence, persecution, and other inhuman acts.

He is likely to be joined by other high-level suspects from both sides of the conflict, the ICC prosecutor said.

This is a warning to everyone who commits crimes (in order to)retain power. If you commit atrocities to retain power, you will face justice, prosecutor Luis Moreno-Ocampo said.

We have evidence that the violence did not happen by chance: widespread and systematic attacks against civilians perceived as supporting the other candidate were the result of a deliberate policy, he said, adding that both parties in the conflict allegedly committed crimes.

Gbagbo's detention was welcomed by human rights groups, but could prove divisive in Ivory Coast, the world's biggest cocoa producer, and trigger unrest among his supporters.

The timing of his transfer is sensitive. Ivory Coast is due to hold a parliamentary election on December 11 which Gbagbo's FPI party is boycotting in protest at the treatment of its top officials arrested in connection with the conflict.

His sudden arrest may also serve as a reminder to politicians in Democratic Republic of Congo where the results of Monday's election are being challenged. Moreno-Ocampo told Congolese politicians earlier this month to avoid electoral violence or risk facing the court.

Gbagbo will make an initial appearance in court within a few days. His aides have branded the action victor's justice, saying it highlights the international community's bias towards former IMF executive Ouattara, who came to power after French soldiers helped him oust Gbagbo.

This is a criminal court, an international court that is manipulated, which serves the interests of the big powers, France in particular, which has scores to settle with African leaders, Gbagbo aide Toussaint Alain told Reuters.

Alain warned that Gbagbo's detention in The Hague would create resentment, rancour back in Ivory Coast.

Gbagbo's lawyer, Emmanuel Altit, said the former president was tricked into believing on Tuesday that he was to appear before an Ivorian court on charges related to economic issues.

The arrest is illegal, the detention arbitrary and the transfer ... is itself also completely illegal, said Altit.

SECRET TRANSFER

Gbagbo's arrest marks a breakthrough for the ICC prosecutor, as up to now some of his top targets have eluded him.

Libya's Muammar Gaddafi was captured and killed, his son Saif al-Islam seems likely to be tried in Libya, while Sudan's President Omar al-Bashir, wanted on charges of orchestrating genocide in Darfur, has travelled freely to countries including ICC members Malawi, Chad, Kenya and Djibouti.

In Gbagbo's case, the ICC and Ivory Coast authorities tried to keep his arrest and transfer to The Hague secret for fear it could be derailed. The arrest warrant was issued under seal, to ensure it was kept under wraps until the last minute.

Gbagbo was taken by helicopter on Tuesday from remote Korhogo in northern Ivory Coast, where he had been under house arrest since his capture, and put on a plane to Rotterdam. A convoy of police vans drove him to The Hague on Wednesday.

His trial is likely to prove as divisive as his election loss -- almost half of Ivorians voted for him.

The militiamen who backed Gbagbo during the dispute have largely fled, been disarmed or are in hiding, but popular anger, especially in Gbagbo's homeland in the west, could easily flare.

Results certified by the United Nations showed Ouattara won the election by a near 8-point margin, but his rival refused to concede and cracked down on suspected Ouattara supporters.

So far, none of Ouattara's top officials have been arrested for alleged crimes during the conflict.

On the streets of Abidjan, some expressed surprise at Gbagbo's sudden transfer to The Hague.

Why couldn't they try him here, instead of sending him abroad? said Patrice Ehouma, 36, a trader, taking shelter under a palm tree from a tropical rainstorm.

Henri Irie, a retired civil servant said it was right for Gbagbo to be tried in The Hague. Now he will learn to accept defeat. Now, because of him, the country is poorer than ever, no one has work or enough to eat, he said.

(Additional reporting by Tim Cocks and Alain Amontchi in Abidjan, Mark John in Dakar, and Alexandra Sage in Paris; Writing by Sara Webb; Editing by Rosalind Russell)