Kenyan MPs have voted overwhelmingly for the country to pull out of the treaty which created the International Criminal Court in The Hague.
The move comes a week after the ICC prosecutor named six Kenyans he accuses of being behind post-election violence.
The prosecutor's list included senior politicians and civil servants.
The MPs do not have the power to effect any immediate change in relation to the ICC but they have sent a message to government to start withdrawing.
Some 1,200 people died and more than 500,000 fled their homes in the violence following the disputed election in December 2007.
It ended when President Mwai Kibaki and his rival Raila Odinga agreed to share power, with Mr Odinga becoming prime minister.
In the peace deal they signed it was agreed perpetrators would face justice in Kenya or at the ICC in The Hague.
The BBC's Will Ross in the capital, Nairobi, says if the government backs the MPs' call it would take at least a year for Kenya to formally withdraw from the ICC but active cases would not be halted.
On the list was Uhuru Kenyatta, the deputy prime minister and son of the country's first president, Jomo Kenyatta.
Also included were other senior politicians - allies of both the president and prime minister - and the former head of the police force.
During the late-night session, the MPs decried the ICC as a colonial, anti-African court and said that Kenya was surrendering its sovereignty.
"It is only Africans from former colonies who are being tried at the ICC," Kenya's Daily Nation paper quotes Energy Minister Kiraitu Murungi as saying.
"No American or British will be tried at the ICC and we should not willingly allow ourselves to return to colonialism,'' he said.
Only one MP, Martha Karua, the former justice minister, offered a different view.
"The ICC did not come to us. We beckoned it," she said.
"If Kenyans were wondering about impunity, this is the face of impunity."
Our reporter says that some MPs had believed it would take many years for the wheels of justice at the ICC to start turning.
That is why they had opted for the international court rather than a local tribunal.
He says they were shocked when ICC prosecutor Luis Moreno Ocampo named the suspects because for the first time in Kenya's history it started to look as though the untouchable political elite might finally be held to account.