An Indonesian court has rejected an appeal by the lawyers of Muslim cleric Abu Bakar Ba'asyir and has ruled he must stay in detention.
Ba'asyir's legal team had argued that his detention was carried out under the orders of foreign governments and was therefore illegal.
Ba'asyir is being questioned about his alleged role in terrorist activities.
This current spell of detention began in April. He can be held for six months before formal charges are laid.
Ba'asyir's lawyers have referred to meetings between US Secretary for Homeland Security Tom Ridge and senior US officials in arguing that there has been foreign interference in his case.
But Judge Harry Sasongko told the South Jakarta District Court on Monday: "The arrest was legal and in line with the law."
Ba'asyir's lawyers said they would now appeal to the High Court.
Their client denies any involvement in terror activities.
Police have not specified what new charges might be brought against Ba'asyir, but in the past he has been accused of being spiritual leader of Jemaah Islamiah (JI), a South East Asian militant group blamed for the 2002 Bali bombings.
Lingering suspicions
Mr Ba'asyir was arrested shortly after the Bali bombings in October 2002, in which 202 people - mostly Australian tourists - were killed.
Mr Ba'asyir was never charged in connection with the bombing, but he was accused of plotting to overthrow the government as the alleged spiritual leader of JI.
He was cleared of the treason charge in September 2003, after judges said there was not enough evidence to prove he was JI's spiritual head.
He was instead jailed for four years for subversion and immigration offences, the subversion charge later being overturned on appeal.
The BBC's correspondent in Jakarta, Rachel Harvey, says Western and regional intelligence experts remain convinced that Mr Ba'asyir is connected with JI.