How to fight terrorism in a democracy under the rule of law?
The UK had to grapple with that problem during 40 years of IRA terrorism and is now having to confront it again in the face of the threat from Islamic fundamentalists.
The case of the Algerian man known as "G" is being dealt with under a piece of legislation passed soon after the al-Qaeda attacks in New York and Washington in September 2001.
The Anti-Terrorism, Crime and Security Act give the home secretary the power to detain foreign nationals who are thought to be a potential danger to the UK, but who cannot be deported because they face persecution in their own countries and no other country will take them.
They are held because the intelligence services, MI5 and MI6, have information about them which gives rise to suspicion that they are linked to international terrorism.
Normally they would be charged with criminal offences and brought before the courts.
But in the case of the 12 individuals still being detained under this Act, there is either not enough evidence to charge them or the information about them comes from sources which the government does not want to be exposed in court.
So what to do with them?
The answer from the Home Office has been an extraordinary legal forum called the Special Immigration Appeals Commission.
Three High Court judges decide if the home secretary is right to order the detention of these individuals.
Protesters at Belmarsh recently demanded the detainees' release
It is extraordinary because the men do not know what information is held about them. Nor are their lawyers allowed to know.
The information is given to a trusted special advocate who represents each man. Most of the hearings are in private with the decision taken by the three judges.
In all but one of the cases they have agreed with the home secretary that the men are dangerous and should be held.
They could, of course, walk out of prison tomorrow but would have to agree to be deported to a country prepared to take them.
Instead, they have decided to fight the whole process and the decision to free G has been a significant setback for the Home Office.
The key point is that the judges on SIAC decided it was the indefinite nature of the detention which had caused G's mental deterioration.
That is a highly sensitive point for the government and is similar to the criticism of the regime imposed by the Americans on detainees in Guantanamo Bay.
It also raises the possibility that other detainees here in Belmarsh prison may appeal on similar grounds.
Home Secretary David Blunkett plans to amend the law so that he can appeal to a higher court against SIAC decisions over bail.
He clearly feels that some members of the judiciary are not helping in these times of high terrorist threat.
But on the other side of the argument, he has been fiercely attacked by lawyers and human rights groups for abandoning the very legal safeguards which distinguish democracy from totalitarian intolerance.
The government insists that extraordinary threats require extraordinary solutions.
It will be a prolonged debate as the terrorist threat will be with us for years to come.