Two Kenyan leaders charged with crimes against humanity have retaliated with an all-out attack on the International Criminal Court. Although Kenya is a court member, and President Uhuru Kenyatta and Deputy President William Ruto have agreed to cooperate, they are doing everything they can to discredit the institution by accusing it of racial bias and of being a Western tool.

Let’s be clear: The court has the case because Kenyans refused to initiate their own process to ensure accountability for the victims of the violence that followed the 2007 election, when mobs went on a rampage, killing, raping and setting fire to homes and businesses. More than 1,100 people died in the ethnic clashes. They are the real victims here, and they deserve justice.

An African Union panel, led by Kofi Annan, the former United Nations secretary general, mediated an end to the crisis, and a Kenyan inquiry commission concluded that at least some violence was organized with the aid of businessmen and politicians. The commission called for a special tribunal to bring those responsible to account. If that didn’t happen, it said, the case should be turned over to the International Criminal Court. After the Kenyan Parliament twice rejected proposals to create a tribunal, the case went to the I.C.C. prosecutor, who charged six people with crimes against humanity — among them Mr. Kenyatta and Mr. Ruto, who were leaders of rival political parties in 2007-8 and have since joined forces.

The charge of racism against the I.C.C., while specious, has a certain appeal: Of the eight cases brought by the court, all involve African states. There are indeed real questions about why charges of war crimes and crimes against humanity have not been pressed elsewhere — in Afghanistan, Iraq and Syria. Still, serious abuses occurred in each of the African cases now before the court, and they need to be adjudicated.

While the court may be flawed, it is the last resort to deliver justice for victims of conflict in countries that lack the capacity or will to do so themselves. Last May, the African Union passed a resolution accusing the court of targeting Africans. What it really should have focused on, and applauded, is that the court is also defending Africans, including the 1,100 Kenyans slaughtered in 2007-8.