The decision by the government's chief legal adviser to denounce the detention centre in Cuba as 'unacceptable' will dismay the Bush administration, which has continually rejected claims that the camp breaches international laws on human rights.

But Goldsmith will tell a global security conference at the Royal United Services Institute this week that the camp at Guantánamo Bay must not continue. 'It is time, in my view, that it should close.' An urbane lawyer who eschews the limelight, Goldsmith is not known for shooting from the hip in such unequivocal terms; however, it is clear he has harboured grave doubts for some time over the legality of Guantánamo under international law.

'There are certain principles on which there can be no compromise,' Goldsmith will say. 'Fair trial is one of those - which is the reason we in the UK were unable to accept that the US military tribunals proposed for those detained at Guantánamo Bay offered sufficient guarantees of a fair trial in accordance with international standards.'

Although privately some senior ministers believe Guantánamo should be closed down, no one has so far condemned the camp in such open and trenchant terms. To date, the strongest criticism of the camp has come from Peter Hain, the Northern Ireland minister, who said on Newsnight in February that it was his personal belief that the camp should close, while the Prime Minister said only that it is an 'anomaly' that will have to end one day.

Goldsmith's speech will be welcomed by human rights groups and senior members of the judiciary who have long campaigned for the government to use its influence to persuade its ally to close the camp. The former Law Lord, Lord Steyn, now chairman of the human rights group, Justice, said last month that 'while our government condones Guantánamo Bay the world is perplexed about our approach to the rule of law.'

Steyn made it clear that if the British government were to criticise Guantánamo it would have significant consequences. 'You may ask: how will it help in regard to the continuing outrage at Guantánamo Bay for our government now to condemn it?' Steyn said. 'The answer is that it would at last be a powerful signal to the world that Britain supports the international rule of law.'

In February, a high court judge, Mr Justice Collins, condemned America's approach to human rights after reading a report by the UN human rights commissioner which found evidence of torture at the camp. 'America's idea of what is torture is not the same as ours and does not appear to coincide with that of most civilised nations,' Collins said.

Last week, two high court judges heard a legal argument that the government should demand the release of three British residents held in Guantánamo on the grounds that they had been subjected to torture. Lawyers for the men said the government should lobby for their release because they were being detained 'unlawfully'. But Lord Justice Latham and Mr Justice Tugendhat said that, while the argument was a powerful one, 'decisions affecting foreign policy are a forbidden area'.

Goldsmith will use his speech to acknowledge the judges' concerns and point out that the increased terrorist threat has increased divisions between the government and legal experts.

'I would suggest that the greatest challenge which free and democratic states face today is how to balance the need to protect individual rights with the imperative of protecting the lives of the rest of the community,' Goldsmith will say.

'The UK government is constantly being criticised for striking the wrong balance. Sometimes the criticism comes from the right, from those who see the Human Rights Act as a charter for criminals and terrorists which impedes the executive's freedom of manoeuvre at every turn. Sometimes the criticism comes from the left, from those who see in every government initiative a threat to civil liberties. Such criticism is inevitable.'