MPs in Kenya have voted for a motion withdrawing from the ICC during an emergency debate.
Opposition MPs boycotted the vote, but a bill will be introduced within the next month.
Current Kenyan president Uhuru Kenyatta and his deputy William Ruto ahve been charged by the ICC with crimes against humanity, committed during post-election violence in 2007.
The opposition alliance, Coalition for Reforms and Democracy (Cord), led by former Prime Minister Raila Odinga, walked out of the debate, saying the motion was "capricious" and "ill-considered".
A withdrawal would not bring "honour to the nation and dignity to our leaders", Cord said in a statement.
"Kenya cannot exist outside the realm of international law," Kenya's opposition said.
ICC spokesperson Fadi el-Abdallah told the BBC that Kenya's withdrawal would not affect the cases of the politicians.
"A withdrawal has an effect only for the future and never for the past," he said.
Amnesty International criticised the motion and said it was the latest in a series of "disturbing initiatives to undermine the work of the ICC in Kenya and across the continent".
"Amnesty International calls on each and every parliamentarian to stand against impunity and reject this proposal," said Netsanet Belay, Amnesty’s Africa programme director, in a statement.
“These cases must proceed and the government has a legal obligation to cooperate fully. Put simply, there is no legal way that the government can evade the justice process in these cases.”