Today sees the return to the House of Lords of the contentious issue of extending to 42 days the time someone can be held by the police without being charged. I would have wanted to take part in the debate, though unavoidably I will be absent overseas. My view is that this pernicious provision should be removed from this bill now.

I regard it as not only unnecessary but also counterproductive; and we should fight to protect the liberties the terrorists would take from us, not destroy them ourselves. This proposal is wrong in principle and dangerous in practice.

During my time as attorney general I studied the issue of how long suspects can be held before being charged, and was closely involved with a number of the terrorist plots with which the bill is designed to deal. I had been a solitary voice in government in questioning 90 days. I am confident that it is a wrong-headed and dangerous approach to extend still further the time for pre-trial detention.

It is now hard to find anyone outside the ranks of government who regards this as a sensible proposal. It has been rejected by two former directors of MI5; the experience of prosecutors is that 28 days is sufficient; it has been condemned by former attorneys general, lord chancellors and senior police officers. In the House of Lords, eminent speaker after speaker spoke against it, cataloguing its faults and dangers. It is unnecessary, unworkable, a constitutional muddle and an easy propaganda coup for the extremist radicalisers.

There is now no public support from the police. Last week former assistant commissioner Andy Hayman, one of the most senior officers to have dealt with anti-terrorism and one of the original proponents of the 90-day plan, revealed that the police do not support the proposal. He says that it is unworkable because of the procedures the government had to put in place to buy support in the Commons.

It is particularly unfortunate that a Labour government has been so committed to this. There are other things that would improve our prospects of prosecuting and convicting terrorists and on which we could better spend energy and time: in particular, to allow prosecutors to use evidence from eavesdropped communications.

Among our allies, we alone do not allow intercept evidence (though Britain does allow it if the interception was by someone other than our own state agencies). Of course, if this were to be allowed, there would have to be safeguards to protect secret sources of information. But there is, I believe, a way of doing this. If only the government had used the effort it has spent on trying to force 42 days past sceptical and unwilling parliamentarians, on polishing the plans to allow intercept into evidence, we would be making a really useful contribution to tackling terrorism.

I too want to support the party and its leadership. But in the long run, Labour's reputation for decent values will be seriously tarnished if we force through an unnecessary and draconian restriction on liberty.

The timing of this vote is especially telling. Both presidential candidates in the US have said that they will shut Guantánamo Bay. We are about to see some of the most visible and wrong practices of the "war on terror" come to an end. So, right at the moment that the US would be turning decisively against such draconian anti-terrorist laws, a Labour government could have the shameful distinction of being the last to enact a reviled piece of law that undermines the fundamental values of our society. Forty-two days should be consigned decisively to the bin. The house has the chance to do that today.

· Lord Goldsmith QC was attorney general from 2001 to 2007 goldsmithp@parliament.uk