Chris Grayling is one of the most unjustly denigrated Tories of recent years. The news yesterday afternoon that he had unexpectedly failed to become chairman of the Intelligence and Security Committee, having been defeated by a manoeuvre by Julian Lewis, was greeted, one is sorry to report, not just with gasps of surprise but with howls of laughter in the Commons press gallery.

For it appeared to confirm the received opinion that everything Grayling touches turns to dust. Indeed, even before he failed to get the job, he was the subject of dismissive comment.

Here is Rachel Sylvester, expressing with her usual precision in her column in The Times the reaction of members of the Establishment to his prospective appointment:

“It’s like replacing James Bond with Johnny English. The prime minister’s decision to make Chris Grayling chairman of the powerful Intelligence and Security Committee (ISC) has been greeted with ridicule in parliament and raised eyebrows in Whitehall. This crucial role has always been held by senior figures who are widely respected for their independence, experience and expertise…

“One Tory grandee, who served in cabinet with him, says of the ISC chairmanship: ‘Whatever the reason for manoeuvring Grayling into that position, it’s clearly not to do with ability.’ Another former minister describes him as a ‘perpetual failure’, while a former Conservative strategist reveals that when he worked in No 10 ‘aides regularly scratched their heads about why he was considered worthy of senior cabinet roles’.”

What perfect intellectual snobbery. Grayling is not one of us. He’s a dimwit with whom it would be pointless to have lunch.

His loyalty and assiduity are ignored. The press long ago decided he is one of the guilty men. For while cautious careerists have prospered by keeping their heads down while fulfilling the demands of the powers that be, Grayling rose and then stuck around thanks to his vulgar talent for saying what the public think.

Born in London in 1964, he was brought up in Buckinghamshire and went to the Royal Grammar School in High Wycombe, where he was known to some as Failing Grayling.

At Sidney Sussex College, Cambridge, he read history, joined the Social Democratic Party, and was known to some as the Grey Thing. On leaving, he joined the BBC.

His political persona soon became that of a stalwart defender of the unglamorous middle class. As if to make up for his youthful flirtation with Social Democracy, he always tries, according to one of his colleagues, “to be the most Conservative voice in the room”.

“He’s completely decent,” another ministerial colleague says. “He’s a loyal Conservative who dutifully serves the party while also having strong views of his own.”

Advisers, some of whom refer to him as “the Grey Lord”, are often quite fond of him: there is nothing grand about him. Ministers who have served under him sometimes grind their teeth at the memory of his insistence on micromanaging things in a dogmatic and cackhanded way.

Grayling backed Vote Leave: in itself sufficient reason in some quarters to write him off. But he first rose to notice while the Conservatives were still in opposition.

For although David Cameron and his team had many merits, they realised they were not cutting through to the wider public. They needed an attack dog, someone who could make Labour politicians yelp with pain as he sank his teeth into them.

Grayling was that dog. He had worked for the BBC, so understood the soundbites it required, and he had an ability to express the views of middle England which the clever, classy men round Cameron did not possess.

As George Osborne remarked of Grayling, while watching him on television savaging a senior Labour figure: “I’d hate to have him on my tail.”

Here is Iain Martin, praising him in The Daily Telegraph in December 2008:

“Chris Grayling has proved himself one of the Tories few really effective attack dogs this year. He is expert at obtaining government leaks or rooting around in official stats to find embarrassing evidence of ministerial incompetence, and then broadcasting pithy soundbites in reaction on TV like a young Norman Tebbit.”

Grayling was a rising star. He entered the House as MP for Epsom and Ewell in 2001, joined the Shadow Cabinet and was appointed Shadow Leader of the House by Michael Howard in 2005, and this was followed by appointments by Cameron as Shadow Transport Secretary, Shadow Work and Pensions Secretary and, in early 2009, Shadow Home Secretary.

But in the life of an attack dog, whose jaws must fasten at once on any prey that presents itself, mistakes are liable sometimes to occur. Grayling at the Conservative Party Conference in October 2009 sank his fangs into Sir Richard Dannatt, presumed by him to be one of Gordon Brown’s appointments, but actually one of Cameron’s.

The following March, The Observer published a recording of Grayling telling the Centre for Policy Studies:

“I personally always took the view that, if you look at the case of should a Christian hotel owner have the right to exclude a gay couple from a hotel, I took the view that if it’s a question of somebody who’s doing a B&B in their own home, that individual should have the right to decide who does and who doesn’t come into their own home. If they are running a hotel on the high street, I really don’t think that it is right in this day and age that a gay couple should walk into a hotel and be turned away because they are a gay couple, and I think that is where the dividing line comes.”

To Grayling, this probably sounded like a judicious compromise, but gay rights campaigners were up in arms, to the grave embarrassment of the Cameroons, who had been making every effort to show how liberal the Conservative Party now was.

When Cameron soon afterwards formed his coalition with the Liberal Democrats, and had fewer Cabinet posts to hand out than would have been the case in a majority Conservative government, Grayling was one of those who lost out.

Theresa May became, as Home Secretary, the most senior woman in the administration, and Grayling had to content himself with the post of Minister of State at the Department of Work and Pensions.

He accepted his demotion with good grace, and did valuable work, as seen in this 2011 address by him to the Politeia think tank, on the extraordinarily difficult question of how to make work worthwhile for recipients of welfare benefits.

The progress made in getting people back to work was one of the Coalition’s great successes, and Grayling contributed to it. In 2012 Cameron made him Lord Chancellor and Justice Secretary.

In these roles he attracted very poor reviews. On one occasion he shocked the Lords Select Committee on the Constitution by denying that he had an overriding duty to uphold the independence of the judiciary, even though that is in the Lord Chancellor’s oath.

When asked in an interview with ConHome whether it was a disadvantage to be the first Lord Chancellor for 400 years who was not a lawyer, Grayling made the astonishing observation that on the contrary, it was an advantage, as this meant he was not biased in favour of the legal profession.

His suspicion of lawyers, though widely shared by the public, rendered him unsuitable for the role of Lord Chancellor, which Tony Blair’s barbaric reforms had left in a mutilated state.

Grayling conducted a partial privatisation of the probation service which he was told would be a failure, and which was. Although this was Coalition policy, he took the blame for it, as he did for cuts in legal aid, the introduction of court fees and various other misconceived measures.

George Osborne, as Chancellor of the Exchequer, had inflicted deep cuts on the Justice Department, for which Grayling found himself taking pretty much full responsibility.

In his memoirs, Cameron offers this minimal explanation of why he kept Grayling on after the general election of 2015:

“Chris Grayling seemed a good fit for Leader of the House of Commons (he hadn’t excelled at Justice, but getting rid of him would anger the right).”

Grayling was of value to the Cameroons, because they could point to him as a representative of the right of the party. He was there to lend balance to the Cabinet.

They did not think highly of him, but as one of Grayling’s supporters observes, the Cameroons “did not think highly of any of the Eurosceptics”.

They underestimated his astuteness in internal party matters. He timed to perfection his insistence, to Cameron, in the run-up to the EU Referendum, that ministers must be free to campaign for either side.

And while he was a Leaver, he did not burn his bridges with the Remain camp, and was even regarded within Vote Leave as having remained too close to Remain.

After Leave had won, he quickly fell in behind Theresa May, for whom, many years before, he had run a council campaign in Merton in south London, where Grayling also served as a councillor.

Now he chaired her leadership campaign, and she rewarded him by making him Transport Secretary. Here too he attracted poor reviews. He had signed off a huge, big bang change to the railway timetable which became a fiasco.

And he was mocked for awarding a ferry contract, so medical supplies could still be obtained in the event of a no deal Brexit, to  a ferry company which had no ships.

The decline of the Merchant Navy makes finding ships in a crisis more difficult than it used to be. Peter Oborne is one of the very few journalists who has sought to defend Grayling’s conduct, pointing out that Philip Hammond, as Chancellor, released the necessary funds too late for more satisfactory arrangements to be made.

Once again, Grayling took the blame on behalf of the Treasury. He displays a willingness to put his head above the parapet even when he has been supplied with nothing much in the way of ammunition.

Grayling backed Boris Johnson for the leadership in 2019, but did not join the new Government. A career as an elder statesman beckoned, but was  impeded yesterday afternoon.

Few senior Conservatives in recent times have attracted such scornful, condescending coverage as him. He is often described as “hapless”, the implication being that he cannot help getting this coverage, which is probably true.

For the press needs scapegoats, and Grayling lacks the soft word that turneth away wrath. He has, however, demonstrated prodigious powers of endurance, keeping going through storms of criticism which would have driven many a lesser figure out of politics.