Alan Bennett, the playwright and mordant champion of the underdog, has turned his fire on the creeping privatisation of Britain’s public institutions in an unabashedly left-wing lecture which also criticised the rightward drift of fellow literary greats.

The 80-year-old writer used a “sermon” at Cambridge University to lambast what he said was the pursuit of profit in public services from prisons to the National Health Service, and suggested the drivers of privatisation were comparable to the “devout louts” of 17th Century puritanism.

In a broad-ranging sermon before the university, Bennett criticised the lack of fairness in British society encapsulated by the private school system, recalling his own visit to Cambridge in the 1950s with “the odds stacked against me” as he sought a scholarship against public school-educated rivals.

Download the new Independent Premium app Sharing the full story, not just the headlines

The author of The History Boys, the tale of the travails of pupils at a fictional Northern grammar school to enter Oxbridge, which was recently voted Britain’s favourite play ahead of Shakespeare’s Hamlet, said he was particularly troubled by the erosion of the public sector.

Bennett, who was treated for colon cancer in 1997, said: “Without the state I would not be standing here today. I have no time for the ideology masquerading as pragmatism that would strip the state of its benevolent functions and make them occasions for profit.

“And why roll back the state only to be rolled over by the corporate entities that have been allowed, nay encouraged, to take its place? I am uneasy when prisons are run for profit or health services either. The rewards of probation and the alleviation of suffering are human profits and nothing to do with balance sheets.”

He added that the pursuit of privatisation was driven by ideologues who are “as… convinced of their own rightness as any of the devout louts who four and five hundred years ago stove in the windows and scratched out the faces of the saints as a passport to heaven”.

The writer, who earlier this year said he had kept his sexuality private for much of his life to avoid being pigeonholed as a gay playwright, has previously been outspoken on issues such as public schools, calling for the abolition of private education.

Notwithstanding recent efforts to narrow the divide between state and private schools with measures such as sponsoring academies, Bennett criticised what he said was the failure of successive British governments to tackle the issue of inequality in education.

In the lecture, delivered at King’s College Chapel earlier this month and published today in the London Review of Books, the playwright said: “My objection to private education is simply put. It is not fair. And to say that nothing is fair is not an answer. Governments, even this one, exist to make the nation’s circumstances more fair, but no government, whatever its complexion, has dared to tackle private education.”

Explaining that his radicalism stemmed from the changes wrought by the Thatcher era, Bennett was also unable to resist the temptation of a swipe at fellow household literary names - including Kingsley Amis, John Osborne and Philip Larkin - who he said had drifted into a right-wing outlook on life as they aged.

He said: “Without ever having been particularly left-wing I am happy never to have trod that dreary safari from left to right which generally comes with age, a trip writers in particular seem drawn to, Amis, Osborne, Larkin, Iris Murdoch all ending up at the spectrum’s crusty and clichéd end.”