After political theatre comes political farce. The impending parliamentary byelection between an egocentric rightwing Tory and a maverick rightwing journalist is so full of crazy contradictions that it's hard to know where to start.

If Kelvin MacKenzie stands against David Davis, the latter will surely rue the day he made his bizarre decision to resign on a matter of principle. Instead of stimulating a serious debate he will find himself in an embarrassing circus. As editor of the Sun for 12 years, from 1981, MacKenzie was the master of publicity stunts that turned politicians from all parties into a laughing stock.

He launched venomous attacks on Neil Kinnock, Tony Benn and "Red Ken" Livingstone; and his paper was scathing about John Major, Norman Lamont and Michael Heseltine. Among its most memorable, and cruel, headlines were those concerning the private peccadilloes of ministers, such as David Mellor ("From toe job to no job") and Tim Yeo ("Off Yeo go, you dirty so and so").

Davis can have no idea what is about to hit him. Nor, for that matter, can MacKenzie, who is spontaneous rather than a strategist. He will, though, have two big advantages. First, his campaign will be funded by Rupert Murdoch. One has to wonder at the audacity of an Australian-American media mogul backing a Sun columnist to try to win a British parliamentary seat. It does not link Murdoch to a particular party, but it does open him up to scrutiny about his political involvement in this country.

It will also mean that any MacKenzie faux pas, and there are bound to be a few, may reflect badly on the man he calls "boss".

Second, of course, will be the publicity generated for MacKenzie by the Sun. It is still the biggest-selling paper. Though most of the Haltemprice and Howden constituency is rural, and not therefore strong Sun territory, it sells well in the Hull suburbs where most of the voters live.

Doubtless the Sun's editor, Rebekah Wade, will be relying on MacKenzie to make headlines, but they may not all be positive. He has a knack of upsetting people, having outraged Liverpudlians, the Scots, the Irish and the populations of France, Germany, Japan and Argentina. I can't remember him saying a good word about Hull either.

Nor is his extremely modest electioneering track record much cop. Having formed the Red Mist party to fight for a place on his local Elmbridge borough council in Surrey - because of a 43% increase in car park charges - he lost by a mile. To a Tory.

Davis may take heart from that at least. The irony is that he and MacKenzie have very similar social and political backgrounds. They are roughly the same age. They both grew up in south London, though Davis had a poorer upbringing. They both did well in their careers. Down the years they both appear to have shared what might be termed a muscular conservative outlook. Davis supported the restoration of the death penalty in 2003. MacKenzie has long been a staunch advocate of stronger powers for the forces of law and order.

Yet these two arch conservatives are now about to trade blows because one is happy about locking people up without charge for 28 days, but cannot abide the thought of them suffering a 42-day detention, while the other would happily lock'em up for 420 days. And throw away the key.

Come polling day, the best headline for the Sun's rival redtop, the "socialist Daily Mirror", has to be: "If Kelvin wins today will the last person to leave Haltemprice and Howden please turn out the lights".