Kenyan MPs have approved a motion to leave the International Criminal Court (ICC) following an emergency debate.
A bill to this effect is expected to be introduced in the next 30 days, after opposition MPs boycotted the vote.
The ICC has charged President Uhuru Kenyatta and Deputy President William Ruto with crimes against humanity, which they both deny. Mr Ruto's trial is due to start in The Hague next week.
The ICC said the cases would continue even if Kenya pulled out.
The charges against both Mr Kenyatta and Mr Ruto stem from violence that broke out after disputed elections in 2007, in which more than 1,000 people were killed and 600,000 forced from their homes.
Mr Kenyatta is to go on trial in November.
Although this vote does not halt the legal proceedings at the Hague, it sends a rather powerful message of both defiance and disaffection to a body that has been criticized for essentially engaging in systematic witch-hunts of African figures.
It would not be unexpected that other African countries may consider this line of action in the near future.
The ICC was established in 2002 and the Rome Statute has been ratified by 121 countries, including 34 in Africa.
Ironically, most western nations, the United States included, have refused to sign on to the ICC Statute.