MP Davis resigns from UK parliament
Mr Davis, 59, told reporters outside the House of Commons he believed his move was a "noble endeavour" to stop the erosion of British civil liberties.
He is one of the best-known opposition MPs and his resignation came as a complete surprise in Westminster.
Davis is considered a star in the party and his resignation has confounded both party insiders and observers.
BBC Political Editor Nick Robinson said it was an extraordinary move which was almost without precedent in British politics.
Mr Davis has led the opposition to Labour's plans to extend the maximum limit terror suspects can be held beyond the current 28 day maximum.
On Wednesday, he accused the government of "buying" the nine votes they needed to get the legislation through the Commons.
He vowed that the Conservatives, who are the official opposition and favourites to win at the next election, would continue the fight in the House of Lords.
Opposition Lib Dems say that they will not oppose Davis in his by-election.
Clegg, the Lib Dem leader, said in a statement today that the Lib Dems would not put up a candidate against Davis at the byelection.
Clegg said: "David Davis's decision to resign his seat and fight a byelection over the issue of 42 days is a dramatic move. I am grateful to him for having informed me following the vote of his intention to take this step.
"The Liberal Democrats have consistently opposed this unnecessary and illiberal proposal which poses a threat so serious to British liberties that it transcends party politics.
The Tories stood in support of their colleague's decision.
David Cameron, the Conservative leader
This is a personal decision for David Davis. He is a friend and colleague and I will be happy to campaign for him in his constituency. I pay tribute to the campaign he has been waging on behalf of the party on 42 days. But we cannot put home affairs on pause and it is my job to ensure that we have a team that's ready for government. We remain fully committed to our opposition to 42 days and the new shadow home secretary, Dominic Grieve, will step up our efforts to fight against it in parliament.
Dominic Grieve, the incoming shadow home secretary
In all parties there are debates and issues but the idea that this has been some sort of divisive issue is a fantasy; our position was arrived at without any difficulty and when we saw the legislation and what was in it our decision to resist it was unequivocal. There has never been any split on 42 days of any kind at all within the shadow cabinet; we have united in our view that the measure is unnecessary, wrong and, in fact, with the concessions we have now had, appallingly drafted.
Guardian Columnist Michael White called Davis's move "an ego-trip."
This was closer to a stunt - an ego-trip too. But it had echoes of a repetition of John Major's resignation as Tory leader in 1995 to face down his cabinet critics, or when the 14 Unionist MPs stood down and fought their seats in protest at one of the Anglo-Irish agreements.
The shadow home secretary has form in this respect. He is a loner, emotional and impulsive; this was his own decision.
David Cameron is calling it "courageous" - the kind of word Sir Humphrey would have used when Jim Hacker was poised to do something silly in Yes, Minister
As he has now made plain on TV, Davis is launching his own heart-felt libertarian campaign against the prospect that Gordon Brown will deploy the Parliament Act to force through the counter-terror bill against the will of the Lords, which is poised to overturn last night's slim, 315 to 306 vote Commons majority.
He wants to stage a byelection in his constituency of Haltemprice and Howden to demonstrate - against the run of opinion polls - that the public is fed up with the increasingly intrusive, surveillance state, the prospect of ID cards - against what he called "the slow strangulation of British freedom under this government," as he put it today.
At one level this is admirable; serious issues are always at stake when liberty is in play and no one doubts that David Davis does feel strongly.
At another it is distinctly odd. Davis's majority in his Yorkshire seat was 5,116 in 2005 - he fought off the Lib Dems declared "decapitation" strategy. Now the Lib Dems are saying they will not run against him.
But in staging a byelection on his own - this is a personal decision - he is upstaging Cameron, risking an upset (surely unlikely?) and reasserting himself in the party pecking order. Why?
Davis' profile is found here.