Two high court judges have dismissed a fresh attempt by the radical Islamist preacher Abu Qatada to be released from a maximum-security prison on bail pending his deportation back to Jordan.

Lawyers for Qatada claimed that the seven years he has spent in detention was the longest in English legal history and his continued detention was no longer justified.

Lord Justice Hughes, sitting with Mr Justice Silber, said, however, the court was "quite satisfied" that Qatada's application for judicial review and a writ of habeas corpus should be dismissed.

After the decision was announced, Qatada's lawyers indicated they would consider taking the case to the court of appeal once they had seen the court's reasons for its ruling.

Qatada is being held pending a fresh high court hearing in October over whether he can be deported to Jordan to face trial on terrorism charges, after the special immigrations appeals commission (Siac) ruled in May that releasing him during the Olympic Games would be "exceptionally problematic" for the police and security services.

His lawyer Edward Fitzgerald QC told the two judges on Tuesday: "Our submission is that the detention has already gone on for so long as to be disproportionate and unlawful."

He said Qatada, whom a Spanish judge once described as Osama bin Laden's right-hand man in Europe, had spent more than seven years in detention pending his deportation since 2002 and his further detention was unwarranted.

The radical cleric has been released for three brief periods since he was first incarcerated in Belmarsh prison in the aftermath of 9/11 under emergency anti-terror legislation. When he was released earlier this year he faced the most draconian bail conditions ever imposed in Britain, including a 22-hour curfew.

Fitzgerald said Qatada's deportation was no longer imminent in the sense that it could reasonably be expected to take place within a matter of months.

"There comes a point where detention is just too long, and this is the longest period of administrative detention, so far as we know, in modern English history," said Fitzgerald.

"It cannot be right when, we are already at seven years – and when there is an inevitable likelihood this is going on for at least another year – for there to be continued detention of Mr Othman," he said, using Qatada's legal name.

But Robin Tam QC, appearing on behalf of Siac, effectively Britain's anti-terrorist court, said there was a risk that Qatada, would "abscond and go to ground" if he was granted bail. He said on one of the previous occasions that he had been released he had been able, with the aid of contacts, to "stay out of sight" for 10 months.

Tam said that he had been described in one court as a "truly dangerous individual" who was at the centre of al-Qaida-related terrorist activity in the UK.

Qatada is still regarded as having wide and high-level support among Islamist extremists. The al-Qaida leadership made threats earlier this year in relation to his possible deportation.

The home secretary, Theresa May, faced a Commons row earlier this year when a renewed attempt to send Qatada back to Jordan was thwarted by a technical mix-up over dates. May has recently secured assurances from the Jordanian authorities that evidence obtained by torture would not be used in a trial.

A Home Office statement released before Tuesday's ruling said: "Abu Qatada's legal team are clearly clutching at straws in their attempts to get this dangerous man released, when jail is where he belongs.

"We will strongly resist any attempt to overturn the court's decision to keep him locked up ahead of his removal from the UK.

"We agree with Justice Mitting's ruling to keep Qatada in prison and these are the last desperate attempts of a man who has run out of options."

Supporters of Babar Ahmad, a 38-year-old British Muslim who has been held since August 2004 pending his extradition to the US, claim he has faced the longest period of detention without charge in English legal history.