Stan the man

Art - Tom Rosenthal on Stanley Spencer's potent mix of sex and religion

"He was extremely sacramental, and his adored wife wasn't sacramental at all." This lapidary judgement of Stanley Spencer and his first wife, Hilda Carline, came from their daughter Shirin. Just how sacramental Spencer was can be seen at the wonderful retrospective devoted to him now at Tate Britain, the country's first major exhibition of his work since the Royal Academy show in 1980.

Many of Spencer's obiter dicta make him sound like an idiot savant, a perception that was boosted by his appearance: diminutive (barely five feet tall), with a pudding-basin haircut, wandering through the streets of Hampstead or his beloved, native Cookham, pushing a decrepit pram with his easel and painting gear in it. He had the aura of an amateur, naive artist; yet he was surely one of the finest English painters of the 20th century.

"To scorn Spencer as an infantile solipsist is to miss a comic rhetoric - the kind of self-obsessed, eternal adolescent comic persona we recognise in, say, Woody Allen", writes Timothy Hyman in the exhibition catalogue. It is a shrewd summing-up of his elusive character, but no one could paint as well as Spencer did on such an ambitious scale without a formidable intellect. He might have done foolish things, made a terrible hash of his love life; but when he said that "I am on the side of angels and dirt", he was only telling the truth.

In the post-Freudian era, any serious study of the lives of the saints reveals the close relationship of sex and religion. For Spencer, full of religious passion but certainly no saint, these were the two dominant threads of both his life and his art. Few men have made a marriage more catastrophic than Spencer's to the dreadful Patricia Preece, a not very talented (and occasionally fraudulent) painter for whom Stanley left Hilda and his daughters, only to be deprived of both property and conjugal rights as Preece locked him out in favour of the lesbian partner she never gave up. Yet this enigmatic woman, with whom the sex-obsessed Spencer never made love, inspired some of the finest nude paintings in the history of English art.

Patricia's nude, or partially clothed, figure is rendered with an obsessive, almost fetishistic, erotic power. The flesh is painted with an extraordinary mix of adoration and heightened realism; of love and lust; of physical closeness and chilling psychological distance. Every fold of flesh, every sag, every blue vein is recorded as if she were a specimen under a microscope. Here, Spencer is the true father of the clinical, glittering amplitude of Lucian Freud's nudes of both sexes.

Spencer's self-denigration, his helplessness in his rejection by Patricia, is, if anything, surpassed in Toasting (1937-38), in which the naked Hilda towers over the naked Stanley, portrayed as a well-hung child - or, at best, child-man. But not all the sex was a catastrophe. Occasionally, cheerfulness would break out, as in the jolly, priapic, double lavatory drawings, or in On the Tiger Rug (once lost, but rediscovered in 1998). This joyful celebration of his sexual relationship with Daphne Charlton, a married woman in Gloucestershire, brings to mind - as I suspect Spencer intended - the doggerel "Would you like to sin/With Elinor Glyn/On a tigerskin?".

What one learns most vividly from this show is Spencer's great range. His sense of the topography of Cookham or Macedonia, the animation of a regatta, the frenzied activity of a wartime shipyard, the busy chaos of a rural garage, the common human aspect of overpowering religious events such as crucifixions or resurrections - all these are, while apparently so disparate, seamlessly welded together in his unique vision.

His energy was exemplary. He followed the giant Resurrection, Cookham (274cm x 549cm) of 1924-27 with the murals for the Sandham Memorial Chapel at Burghclere. There, he enjoyed the years 1927-32 under the benevolent patronage of the Behrends to commemorate the life of Mary Behrend's brother, who died in the war that Stanley had survived. He had always wanted to master the technique of fresco painting, and on getting the commission, being a great admirer of the Arena Chapel in Padua, he uttered the gleeful words: "What ho, Giotto!"

Sadly for Spencer, but perhaps better for posterity, he was dissuaded from using that medium and painted almost the whole vast memorial to wartime life and death on canvas glued in place. One of the major benefits of the current exhibition is a film showing the mural in close-up glory, which the ordinary visitor to the site could never properly see. The Sandham Resurrection is, if anything, even more original, with its multitudinous white crosses, than those of Cookham or Port Glasgow.

Another superb feature of this show is the digital, computerised simulacrum in virtual reality of Spencer's unrealised and most ambitious project of all, the "Church-House". Made from images in the Tate's archive, the effect is of seeing a real film of this imaginary building, of the many rooms with their echoes of his life with Hilda, mingling with memories of Cookham and his biblical scenes. Typically, Spencer referred to this earthly paradise as "the chapel of me".

One has reservations, even with an exhibition as good as this. I think it was wrong to leave out his 1935 St Francis and the Birds, and his 1936 Seated Nude, the one solo nude formal portrait of Hilda and, therefore, a fascinating counterpoint to the several nudes of Patricia. It would have been useful to have the Port Glasgow Cemetery, because it was the inspiration for the great Port Glasgow Resurrection. I particularly missed the portrait, known initially as Madame X and later as The Psychiatrist. It is a loving and truthful picture of the married Jungian analyst Charlotte Murray, with whom Spencer had an affair while working at Port Glasgow in the 1940s. One can only speculate about how things might have been different had Spencer been her patient instead of, or as well as, her lover. But these minor cavils should not detract from a magnificent homage to an eccentric giant of English painting.

"Stanley Spencer" is at Tate Britain (020 7887 8000) until 24 June