Spain aided the detention and interrogation of two former Guantanamo detainees, a court has been told.
The men are wanted in Spain on terrorism charges
Jamil el-Banna, 45, from London, and Omar Deghayes, 38, of Brighton, East Sussex, returned to the UK last month but now face deportation to Spain.
On arrival in Britain, the men were held under European arrest warrants alleging they were members of an Al Qaeda cell operating in Spain.
Edward Fitzgerald, QC, told a hearing in London it was "obvious injustice".
Mr Fitzgerald, who is the men's lawyer, told Westminster Magistrates' Court there was compelling evidence the Spanish authorities complied with the so-called "rendition" of the men by allowing the plane carrying them to cross Spanish airspace.
He said it was wrong the men should now face extradition to Spain, for "allegations which had already been fully investigated in Guantanamo".
Mr Fitzgerald alleged Spanish representatives from Spain were present during the men's interrogation.
It was "an overwhelming case of abuse of power and abuse of process", he told the court.
Senior District Judge Timothy Workman has extended the men's bail which includes strict conditions such as wearing an electronic tag and obeying curfews.
He ordered the men to return for a further hearing at the same court on 14 February.