Giving The Virtues a rating out of five feels like trying to pin a rosette on a tornado. Its writer-director, Shane Meadows, was already, with the film/TV series This Is England, a fearsome chronicler of ordinary lives racked by violence, addiction, exploitation and revenge, and of how those things can leave scars before their victims have turned 18. But the concluding episode of The Virtues (Channel 4) saw Meadows working on a new level, blending raw feeling and technical mastery to create drama that will live in viewers’ minds for days, weeks, maybe years to come.

The series was, at first, the story of fragile alcoholic Joseph, played with immense heart and guts by Stephen Graham. The loss of his son – gone to Australia with his mother and her capable new man – pushed Joseph into the crisis that his scrappy adult life had been one big effort to stave off: back on the booze, and to Ireland to confront his childhood, which we came to realise had involved being orphaned and, in a home for lost boys, sexually abused.

In episode two, we met Niamh Algar as Dinah, an inlaw whose spiky impudence and savage right hook were revealed in part three to be bravado, masking the grief of having been forced to give up her child at 15. Now we had twin protagonists, each freighted with trauma, ready to break. All this had been established in long scenes, heavy on improvisation and sprinkled with the moments of humour and mundanity that turn characters into tangible humans.

And then, a reckoning. The accumulation of emotional truths had lifted The Virtues up to a peak where the air was barely breathable … then it plummeted, taking us with it, strapped in and helpless as one scene led with dread inevitability to the next, and the next, and the next, each of them a devastatingly intimate two-hander exploring a new aspect of the horror pouring out. Graham’s performance, when Joseph finally unlocked the repressed memory of what happened to him as a nine-year-old, had a primal physicality that is rare in television acting. Equally startling was the quiet announcement – “I was raped” – that followed, a precious moment of clear articulation in a drama about souls corroded by unexpressed agonies.

With the change of pace in the finale came a further concession to art and artifice, compared with what had flowed so organically before. Meadows and his co-writer, Jack Thorne, arranged Joseph and Dinah’s nadirs in parallel, happening simultaneously, with even a missed-connection thriller element added as Joseph’s sister sped through country lanes, unable to find him before he was given the chance to do something he couldn’t undo, while Dinah’s brother failed to pick up her voicemails pleading for intervention.

In weaker hands, this could have destroyed the integrity of the piece, but with Meadows in charge, the final 20 minutes of The Virtues will stand as one of the most intense passages in TV fiction – held together by PJ Harvey’s brilliant score, building from imperceptible drone to a brutal cacophony of stabs and twangs. In those last throes The Virtues distilled itself down to drama in one of its purest forms: whether humans have something deep within that will save them when they face the source of all their pain, with God and their loved ones unable or unwilling to help, and with the lure of the self-destruct button stronger than ever.

The skill of Meadows was evident throughout, from the episode one scene in which Joseph fell off the wagon, so evocative of an out-of-control drunk that you felt hungover watching it and so tense with the possibility of violence that you wanted to run, to the decision to render Joseph’s percolating memories of the children’s home – liminal at first, vivid at the end – as fuzzy 1980s videotape. Little things, such as how long to let superficially unimportant conversations run for, were done exactly right. Big things, such as the amount of blame apportioned to Catholicism, were precisely measured, too.

Meadows made his toughest call after he had finished filming: a discussion at the post-wrap drinks led to the climax of Dinah’s narrative being rewritten and reshot. The Virtues was such elemental, inexorable storytelling that it is hard to imagine anything happening differently, but presumably the lost ending was too neat or redemptive, given that the subject matter was the sort of psychological wound from which so many people do not recover. All this was in service of a story that was exorcising Meadows’ own real-life experience of suppressing, then remembering what befell him when he was nine. Joseph, as well as standing starkly for victims everywhere, is Meadows himself. Such masterful handling of such painful material: The Virtues is a miracle.