''Please, Sir, I want some more." Unlike poor Oliver Twist, adventurous readers will be able to enjoy all the gruel they like with the aid of Norman Longmate's book, which includes an authentic Victorian recipe: "take a spoonful of oatmeal, stirring with one-third of a pint of milk. Make up the rest with water, and boil up three or four times, stirring often." For a truly accurate result, the milk should first be watered down, to two or three times its original volume - such is the level of detail in this, the first full-scale history of the workhouse.

The heyday of this much-feared institution were the years following the New Poor Law of 1834, when roughly 600 new facilities sprang up around the country. This was one of the most ambitious building programmes in British history, yet behind it lay an unusual architectural ambition - to terrorise and haunt the imaginations of the poor. The philosophy of the workhouse was simple: "combine the maximum of efficiency in the relief of destitute applicants with the minimum of incentive to improvidence". In other words, provide the barest means of survival for those unable to support themselves, but combine it with the maximum deterrence, so that the able-bodied pauper would be "aroused like one from sleep" from his lack of industry or frugality. This was an age in which it was felt that everyone wanted something building or doing, so there was no excuse for unemployment among people capable of work.

So those in "the union" were forced to endure the shame of wearing prison-style uniform, made to break stones or pick oakum, and were separated from their families. They slept in rows of coffin-like beds, with pious texts on the walls promising a better life to come. And all within austere, functional buildings designed to make the paupers feel that their environment was "utterly impossible to contend against". Continuing the prison theme, many workhouses were arranged on the panopticon principle, with a single overseer able to keep those ranged around him under constant scrutiny.

Into this machinery of cruelty came the elderly and infirm, the insane, children - those who had no realistic chance of leaving, yet who were subjected to the same deterrent regime as those who did. The workhouse masters and mistresses who lorded it over them could have come straight out of a Dickens novel: one classified those in her care as low women (made to wear yellow uniforms, the colour of a ship's plague flag); another thought education to be "quite injurious - when I finds a promising child, I sets him to work"; and yet another was admiringly described as "a violent lady" by a workhouse board member.

Longmate uncovers many genuinely unsettling accounts of suffering: children locked in coal holes, hung up from the rafters in bags, beaten half to death; the elderly left to die uncomforted and alone. No wonder many paupers chose death rather than enter the workhouse gates. And given that this was an age when it was easy to cover up abuses of trust, researching such incidents cannot have been easy.

Yet this was not a cruelty borne merely through lack of oversight or restraint. This excellent book shows how closely the cold calculation of Bentham and Malthus was linked to the human misery that it caused. The nightmare of the workhouse demonstrates the shortcomings of rational administrative control when not accompanied by compassion.

The workhouse was a radical and ruthless solution to the problem of providing for the truly destitute - mere poverty was accepted as the inevitable condition of the majority of mankind, and the workhouse was not intended to alleviate it. Longmate's achievement in this moving history, like Henry Mayhew's in London Labour and the London Poor, has been to record the experiences of people who, friendless and despairing, otherwise left few traces of themselves behind.

Matt Shinn is a political speechwriter