I have worked closely with the Liberal Democrats since the attacks of 11 September; it has been the only party to adopt a principled and consistent position favouring the rule of law and the protection of individual rights. In difficult times, and in the face of blanket claims invoking risks to national security, the Liberal Democrats have resisted policies embracing torture, rendition and the indefinite detention of alleged terrorists without charge, as well as war under conditions of patent illegality.

After the London attacks of July 2005 the Lib Dems stood firm against the idea that the "rules of the game" had changed, committed to respect of human rights for all. They opposed executive authority, secrecy and the rise of the "security state". In government, on many issues, that position has been maintained. But to my great regret, last week the parliamentary group was whipped to vote in favour of the introduction of secret court hearings in part 2 of the justice and security bill. If adopted, the bill will put British judges in the invidious position of adjudging certain civil claims under conditions in which one party will not be entitled to see the evidence on which the opposing party relies. Last year Lib Dem members voted overwhelmingly against this. They did so again at their conference on Sunday. Their approach was informed, reasonable, principled and correct. Why was it ignored?

This part of the bill is a messy and unhappy compromise. It is said to have been demanded by the US (which itself has stopped more or less any case that raises 'national security' issues from reaching court), on the basis that it won't share as much sensitive intelligence information if the UK doesn't rein in its courts. Important decisions on intelligence taken at the instigation of others are inherently unreliable. We remember Iraq, which broke a bond of trust between government and citizen.

There is no floodgate of cases, nothing in the coalition agreement, nor any widely supported call for such a draconian change. There is every chance that, if the bill is adopted, this and future governments will spend years defending the legislation in UK courts and Strasbourg. There will be claims that it violates rights of fair trial under the Human Rights Act and the European convention (no doubt giving rise to ever-more strident calls from Theresa May and Chris Grayling that both should be scrapped). Other countries with a less robust legal tradition favouring the rule of law and an independent judiciary will take their lead from the UK, as they did with torture and rendition.

I accept that there may be times when the country faces a threat of such gravity and imminence that the exceptional measure of closed material proceedings might be needed. This is not such a time, and the bill is not such a measure. Under conditions prevailing today, this part of the bill is not pragmatic or proportionate. It is wrong in principle, and will not deliver justice. It will be used to shield governmental wrongdoing from public and judicial scrutiny under conditions that are fair and just. The bill threatens greater corrosion of the rights of the individual in the UK, in the name of "national security".

It smells too of political compromise in the name of coalition politics. Being a party of government does not mean such compromise is inevitable. This is particularly important now, as Conservative forces ratchet up their attacks on rights for all and against the European convention. At this moment the need for the Liberal Democrats to stand firm on issues of principle – for individual rights and open justice, against the security state – is greater than ever.

Secrecy begets secrecy. I have listened to all the arguments, and concluded this is a compromise too far, neither necessary nor fair at this time. The point has been made eloquently in recent days by Dinah Rose QC and Jo Shaw. Their principled arguments have long had my full support and so I have joined them in resigning from the Liberal Democrats. I have done so with regret, given the courageous positions adopted on these issues by Charles Kennedy, Menzies Campbell and Nick Clegg in the past. I still hope that the views of the membership might yet prevail, before the bill passes into law. If not, the Liberal Democrats will have lost integrity on one issue that has truly distinguished them from other parties, and on which they can rightly claim to have made a real difference.