AWN Pugin, who was born in London on 1 March 1812, was only 24 when he published Contrasts. It was the book that made his name, and was the first architectural manifesto. Prior to that, there had been treatises on building going back to Vitruvius, texts that set out rules for proportion, aesthetics and construction. Contrasts, as its many critics were quick to point out, had little to say on these subjects. What Pugin offered his readers instead was an entire social programme, one which redefined architecture as a moral force, imbued with political and religious meaning. Published on the eve of the Victorian age, Pugin's polemic was an early rehearsal of a theme that was to echo through the 19th century and return to haunt the 21st: the problems of the modern city.
In 1836, the year of the book's publication, the question was still new. Men and women had never lived together in such vast numbers before, and as industry developed and drew more workers from the country to the towns, so the mills and factories, warehouses, workhouses and slum terraces spread. Ten years earlier, the Prussian architect Karl Friedrich Schinkel, in Britain to carry out some discreet industrial espionage, had been horrified by the lack of planning, the "monstrous, shapeless buildings put up only by foremen without architecture" and the potential in these chaotic streets for disorder.
A decade later the British began to understand what Schinkel had meant. The intervening years had seen the first outbreaks of cholera and some of the worst civil unrest in their history. At Bristol, the Bishop's Palace had been burned down by rioters, and at Nottingham the castle had been destroyed. Pugin's message was simple: if there is something wrong with our cities, then there is something wrong with ourselves, and society and architecture both need reform. His prescription was a characteristic mixture of the romantic and the pragmatic – a proposal which, at any other moment in history, would have seemed fantastic, but one which caught the brittle mood of the mid-1830s.
Contrasts argued for a revival of medieval, Gothic architecture, and with it a return to the faith and the social structures of the Middle Ages. While the text begged as many questions as might be expected of such a thesis, the pictures were a persuasive exercise in graphic polemic. Each plate took a single urban building type and compared the modern example with its 15th-century equivalent. Thus, a picture of a late-Georgian inn, cobbled together inconveniently from a row of terraced houses and set behind sharp iron railings, sat next to one of the Angel Hotel in Grantham, with its welcoming bow windows and promising beer cellar. London University, founded in the year that the book was released, was represented by King's College in the Strand. Its neo-classical gateway, squeezed between houses, looked mean beside the mighty front of Christ Church Oxford. The drawings were all calculatedly unfair. King's was shown from an unflatteringly skewed angle, and Christ Church was edited to avoid showing its famous Tom Tower because that was by Wren and so not medieval. But the cumulative rhetorical force was tremendous.
Pugin had struck at a moment when the architectural establishment was coming under critical scrutiny. The stucco-fronted neoclassicism of the Regency, pilloried in Contrasts, was looking tired. Increasingly, it seemed to represent an age of decadence and waste of public money. John Nash, its most eminent exponent, had died the year before in disgrace, having been unable to account for the huge overspend on Buckingham Palace; a public enquiry had failed to establish the exact cost of George IV's lavish refurbishment of Windsor Castle. While Pugin was planning Contrasts, this simmering resentment against a closed and self-serving architectural establishment came to a head late one October afternoon in 1834, when the Palace of Westminster caught fire.
The blaze turned out to be the last great show of Georgian London, watched by a vast crowd, which included Pugin and Turner, who painted it. As the Office of Works moved swiftly to bring in one of its architects for the rebuilding, public opinion rebelled.
If there was to be a new seat of government, it should mark a new start for architecture as well as parliament. As the Morning Herald put it: "This time the British people intend to have the choosing of the architects." The competition designs and the inevitable row that surrounded the final selection of Charles Barry's Gothic scheme were the context in which Contrasts emerged to popular acclaim.
At the time, however, despite his claims to architectural omniscience, Pugin was little more than a draughtsman. One of his more lucrative jobs had been to provide the decorative details for Barry's winning Westminster design, and he was to return to work on the Palace from time to time for the rest of his life. Over the years he designed some of its most successful elements, including the interior of the House of Lords. Now, however, the success of Pugin's manifesto launched him as an architect in his own right, and he set about rebuilding Britain as a Gothic Catholic Christendom.
It was a Quixotic crusade, but one in which he came closer to success than might ever have been expected. By the time Pugin was 30, he had built 22 churches, three cathedrals, three convents, half a dozen houses, several schools and a Cistercian monastery. He carried the battle into the heart of the industrial cities, the '"inexhaustible mines of bad taste" at Birmingham and Sheffield, infested with "Greek buildings, smoking chimnies, radicals and dissenters". St Chad's, his Birmingham church, built amid the squalor of the gunmakers' quarter, became England's first cathedral since Wren's St Paul's. At the laying of the foundation stone, Pugin announced that he would not rest until the cathedral bells "drowned out the steam whistle and the proving of the gun barrels".
Politically he might best be described as conservative radical. He wanted to reform society by returning it to a benign hierarchy, an idealised medievalism, in which each class could look upwards for support, and would accept responsibility for those below them. It was the indifference of the modern city that appalled him. In 1841 he published a second edition of Contrasts, to which he added two new plates that developed the argument beyond individual buildings, to present a whole moral panorama. One showed "contrasted cities", the other "contrasted residences for the poor". In the first, the medieval city, with its graceful spires and safe, defensive walls, sat beside its modern equivalent, the walls broken down, the spires ruinous and the horizon dominated by kilns and factories. Its point was simple enough: that we build most solidly in the areas of life in which we invest most of ourselves. The contrasted residences of the poor made a subtler case for the relationship between architecture and ideas.
Here Pugin compared a monastic foundation of the Middle Ages, where monks fed and clothed the needy, grew food in the gardens – and in the fullness of time gave the dead a decent burial – with a panopticon workhouse where the poor were beaten, half starved and sent off after death for dissection. Each structure was the built expression of a particular view of humanity: Christianity versus Utilitarianism. Again he hit home. The workhouses, created under the New Poor Law, troubled many Victorian consciences. To the rising generation of architects, these images acted as a call to arms. George Gilbert Scott remembered being "awakened" by Pugin to the possibilities for architecture to deliver human dignity.
Ten years later, at the Great Exhibition, Pugin was able to offer the public some answers to the questions that Contrasts had raised. To furnish his buildings he had designed a complete range of Gothic furnishings, sacred, secular and domestic, and many of them available to order at relatively modest prices. Seen together in the Crystal Palace, his plain flat-pack tables, colourful dinner plates and ceramic garden seats, arranged beside stained glass and vestments, held out a vision of the good life in the modern city – one that combined God with hearth and home, and was deeply appealing to the mid-Victorian mind.
The Great Exhibition should have been Pugin's moment of triumph, but by the time it opened he was fatally ill and disillusioned. He had been in some ways too influential for his own good. Imitators, many cheaper, and all of them easier-going, had poached much of his architectural practice. His work for Barry at Westminster had become a poorly paid treadmill. By a sad irony, the last design he ever made, in January 1852, was destined to be his most famous. It was for the clock tower of the Palace of Westminster. Days later he lapsed into psychosis, and died in September, aged 40.
The clock tower remains his most prominent memorial; but his more important legacy is in the solid civic centres of Victorian towns, the urban churches, local schools and middle-sized family houses built by the next three generations of architects, who had been inspired by Contrasts to try and bring humanity and coherence to the city.
• Rosemary Hill's God's Architect: Pugin and the Building of Romantic Britain is published by Penguin.
• The photo caption at the top of this article was altered on Monday 27 February 2012 to make clear that Gorton Monastery was designed by Pugin's son, Edward, not AWN Pugin as the original said.