The Kenyan government has said it will not accept any more seized Somali pirates to be tried in its courts.It said the international community had not lived up to its promises to help Kenya with the "burden" of prosecuting and imprisoning pirates.
Kenya's foreign minister also said Nairobi was considering terminating an agreement with the EU to deal with pirates caught off the Horn of Africa.
Kenya currently holds more than 100 Somali pirates.
"For the last two weeks we have declined to accept captured pirates from some of our friendly countries and told them to try it elsewhere," Kenyan Foreign Minister Moses Wetangula told reporters.
"We discharged our international obligation. Others shied away from doing so. And we cannot bear the burden of the international responsibility," the minister said.
With Kenya sitting on Somalia's southern border, the country has been on the front line in the fight against piracy, the BBC's Peter Greste in Nairobi says.
He says that this fight has cost shipping through the port of Mombasa dearly because of higher insurance fees and reduced traffic. Tourist ships too have shied away from the region.
That is why Kenya earlier agreed to prosecute pirates caught by the EU naval task force, our correspondent adds.
The head of the EU delegation in Kenya, Ambassador Eric Van der Linden, said he understood the frustration, but felt that there was still room for discussion.
He said it was in Nairobi's interest to contain piracy, but it should not be its burden alone.