Kenya said on Friday it rejected the jurisdiction of the UN's International Court of Justice (ICJ), ahead of a ruling next week on its long-running martime border dispute with Somalia.
The Horn of Africa neighbours have been feuding for years over a stretch of the Indian Ocean claimed by both nations that is believed to hold deposits of oil and gas.
"In addition to withdrawing its participation from the current case, Kenya... also joined many other members of the United Nations in withdrawing its recognition of the court's compulsory jurisdiction," the foreign ministry said.
Kenya announced in March it would boycott ICJ hearings in the case after The Hague-based tribunal refused to allow further delays. The final ruling is due to be delivered on Tuesday.
"The delivery of the judgement will be the culmination of a flawed judicial process that Kenya has had reservations with, and withdrawn from," the foreign ministry said, accusing the court of "obvious and inherent bias" in resolving the dispute.
"As a sovereign nation, Kenya shall no longer be subjected to an international court or tribunal without its express consent."
Somalia, which lies northeast of Kenya, wants to extend its maritime frontier with Kenya along the line of the land border, in a south-easterly direction.
Kenya wants the border to head out to sea in a straight line east, giving it more territory. The disputed triangle of water stretches over an area of more than 100,000 square kilometres (40,000 square miles).
Nairobi maintains it has had sovereignty over the contested zone since 1979.
Somalia took the matter to court after saying diplomatic attempts to resolve the disagreement had led nowhere.
Next week's ICJ verdict may further trouble the often rocky relations between the two countries.
Somalia has long bristled at what it calls Kenya's meddling in regions over its border, while Nairobi has accused Mogadishu of using it as a scapegoat for its own political problems.
Kenya in 2019 recalled its ambassador to Mogadishu after accusing Somalia of selling off oil and gas blocks in the contested area.
It described the move as an "illegal grab" of resources, and sought to remind Mogadishu of Kenya's help in the battle against Al-Shabaab jihadists in Somalia.
Kenya is a major contributor of troops to AMISOM, an African Union military operation fighting the Al-Qaeda-linked fighters waging a violent insurgency across Somalia.
Somalia severed ties in December 2020 after Kenya hosted the leadership of Somaliland, a breakaway state not recognised by Mogadishu.
But the two countries agreed to reset relations when Somali Prime Minister Mohamed Hussein Roble held talks with Kenyan President Uhuru Kenyatta in August 2021.