Kenya says it is shocked at the decision of the UN secretary-general to sack the Kenyan commander of the UN peacekeeping force in South Sudan.
Ban Ki-moon dismissed Lt Gen Johnson Ondieki after a report said it had failed to protect civilians in July.
Kenya condemned the decision as unfair, and said it would withdraw its troops from the UN mission in South Sudan.
The report said peacekeepers did not act when soldiers attacked an aid compound in the capital, Juba.
In the fighting between the army and former rebels, a local journalist was killed and aid workers were raped.
The clashes derailed efforts to form a unity government and end the civil war.
In its statement, Kenya said Mr Ban’s decision to sack Gen Ondieki failed to address the root causes of the problem highlighted in the report.
“What is clear is that Unmiss [UN Mission in South Sudan] suffers from structural dys-functionality, which has severely hindered its capacity to discharge its mandate,” the statement says.
Kenya suggests the UN should have addressed the problems which are dogging its peacekeeping mission rather than “unfairly” blame them on one individual.
It is not clear how many of the UN’s 13,000 troops in South Sudan come from Kenya.
Accused of rape
In connection with the incidents which led to the sacking of Gen Ondieki, several people were arrested on Wednesday in Juba, officials said.
Among those arrested, eight are accused of rape, and eight others of looting.
The government of South Sudan had commissioned its own report on the July incidents but it did not make it public.
The UN has not yet commented on Kenya’s response to the secretary-general’s decision.
Kenya angry at sacking of South Sudan peacekeeping chief