Kenyan police freed an Australian terrorism suspect mistakenly believing he was just an illegal immigrant, the force has told the BBC.
Spokesman Eric Kiraithe said Hussein Hashi Farah was handed to ordinary police rather than specialist officers because of "an oversight".
Mr Farah apparently then reassured police he would appear in court for an immigration hearing, and was set free.
He is wanted for allegedly planning an attack in Australia in 2009.
Mr Kiraithe told the BBC's Focus on Africa programme that there was "credible information" linking him to the terror plot, but gave no further details.
Last year, a group of ethnic Somalis were arrested in Melbourne amid reports they had links to the Islamist rebel group al-Shabab and were planning attacks in Australia.
Mr Farah, who reportedly is of Somali origin, was detained while crossing the border into Kenya from Uganda earlier this month.
Mr Kiraithe said officials checking his details found him on an international terrorism watch list.
"I think there was an oversight - he was handed over to the ordinary duty policemen and they were not given the full information," he said.
"The matter is still under investigation, although the officer who released believes that he released him in an honest and mistaken belief that he was just an illegal migrant who would be dealt with by CID and immigration the following day."
Mr Kiraithe admitted it was highly embarrassing for the Kenyan police, but said that no foreign governments had yet complained over the matter.