Ricky Gervais has announced tonight's Christmas special will be the last episode of Derek.

It shouldn't come as any surprise because his previous sitcoms have consisted of two series with an accompanying festive special, and as we sit here discussing the end of Derek, Gervais will already be knee-deep in his next project.

Tonight's finale wasn't really about Derek. The main focus was Kev, which was initially a disappointment. Kev has always seemed one-dimensional, forever swaggering around the home in his filthy jogging bottoms, with his greasy hair falling into his eyes, or perhaps slouched in a wipe-clean armchair with a can of lager in his hand. His only purpose was to crack filthy jokes and horrify us.

He may not have contributed anything specific to the plots, but we can maybe find a more general dramatic purpose for him: he was there to add a nip of acid to the show, which might have threatened to tumble off into sweetness and schmaltz without the vile Kev. Any poignant moment in the show was sure to be ruined by him burping or groping.

Nonetheless, I was disgruntled to see this utterly unsympathetic - and, yes, often dull - character feature so prominently, until I saw where Gervais was guiding us. He was taking us into a re-telling of the Scrooge story, but this time Scrooge counted lager cans instead of coins and wore Primark joggies instead of a cloak.

Kev starts the episode in classic 'bah, humbug' mode by rubbishing Derek's attempts at songwriting. As he sits at the piano to tap out a babyish one-finger tune about how 'we all likes puppies, dogs and that. We all likes kittens, and older cats', Kev spits out that his songs are terrible.

He prowls around the home, ruining the festive cheer and leering at Hannah, but when he starts a fire in the kitchen she finally orders him to leave.

Derek is distraught. He always regarded Hannah as welcoming and kind, but now she's been cruel enough to throw Kev onto the street. Derek is unable to see the upset Kev causes, whilst Hannah is too angry to see the anxiety she's provoked in Derek. Before she has the chance to calm him and try to explain her actions, the police arrive to say Kev has been found unconscious and has been rushed to hospital.

At his bedside, Derek treats the despicable Kev as he would an injured baby bird or puppy. His view is so simple but heart-warming: Kev is hurt and so we must help him. For Derek's sake, Hannah agrees that he may return to the home, having nowhere else to go but, as he lies there, Hannah delivers a stern lecture. She knows he wants to drink and block out the world. She knows he wants to die, but he has to simply get up each day and live. Eventually, a day will come, she says, where he feels less like dying, and then there might even be a day when he feels he wants to genuinely live. She is the stark and truthful Ghost of Christmas Yet To Come, warning him that this is his last chance. But before his visit from Hannah, his appalling relatives had come reeling onto the ward. They crowded around, cracking open beers, representing the jolly ghosts of Christmas Past but their pinched, sunken faces, and the fact one of them is slumped in a wheelbarrow, suggest the jollity is perhaps forced into their veins by lager.

Kev has a choice to make, and he chooses well. He agrees to give Hannah away at her wedding (on Derek's suggestion). Of course, if Kev appeared at the wedding in an immaculate suit and behaved impeccably then we'd accuse Gervais of straying too far into sentimentality. Instead, Kev's a grubby, embarrassing wedding guest and delivers a speech where he mocks the cash-strapped couple, saying only Adolf and Eva had a worse wedding.

But Kev is on the road to recovery, Hannah is happily married and expecting a baby, and Derek has another date with his girlfriend, an entirely innocent one where the condoms are only used to make balloon animals. It all ends in nice, cosy warmth.

It was nothing spectacular, with Kev's reformation being no match for the Dawn and Tim storyline, but we don't watch Derek for the spectacular; we watch it for the mundane, low-key kindness we can find in everyday life, if we just care to look for it.