Genuine surprises in politics are rare. Tory MPs were genuinely surprised today when David Davis's resignation as an MP was flashed up on TV screens.

"It's not about politics; I'm sure there's no dispute about the 42 day issue; it must be about illness or scandal," predicted one senior shadow minister, caught far from Westminster when the bombshell dropped.

Davis's statement showed how wrong the professionals can be. 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?

It is wrong to say he lost the Tory leadership in 2005 over a single lacklustre speech at a party conference, where young Cameron dazzled his betters. He never looked like the solution to the Tory problem. Now he looks divisive again. Davis's own deputy, David Ruffley, did not know. "What's his game?" the Cameroons must be asking each other.

He is now 59, the child of a single mother who grew up with his grandparents (granddad was a communist), later with his stepfather and mum in south London. No posh schools or university (Warwick) for him, he has an MBA, a Harvard stint, was a "company doctor" - patching up troubled firms.

He was long a member of the Territorial SAS, a man who hikes alone across northern moors. Married with three children, his private life is private: Mrs Davis does not come much to London.

What voters see on TV with David Davis is roughly what he is like in public: cheerful, a bit prickly, but a tough enough man for the rigours of public life.

A few nights ago he had a party for the press, a routine event where he was matey and combative, much like usual.

He talked of what he hoped to do when he is home secretary in the Cameron cabinet after 2010. No brooding hints there.

He was always anti-European, socially conservative, but libertarian, a gut rightwinger who angered old friends as the government whip on the Maastricht bill in 1992-93.

When he finished fourth in the fight for the party leadership in 2001 IDS made him party chairman, then sacked him when he was on holiday - in term time - in Florida. His lack of a party base allowed such treatment.

" A bit lazy," they would murmur. But he has been a big success in harrying Labour home secretaries in the Blair-Brown era.

Yet I cannot help recalling the mid-90s, when he was Major's Europe minister (1994-97). At one stage he wrote a letter to the PM, saying he would prefer to leave the government if he were not made a cabinet minister in the next reshuffle. The letter was leaked, there was a row. Davis stayed put.

The shadow minister I quoted earlier has just rung back. "I think the Davis ego-button has been pressed and that he has bounced David Cameron into this,'' said the dismayed MP.

"The Lib Dems are not standing, Labour may decide not to stand either. Then David would be left fighting Ukip, the Monster Raving Loony party and the BNP. He'd be fighting against nothing and the election would descend into farce."