IT’S easy to think of history as a straight line. We started out rough and muddy, then gradually discovered farming, medicine and science and so became less rough and less muddy, and we’re on our way toward ever brighter civilisation. History is progress, always dragging us forward, whether we like it or not.

That’s a comforting view of history. It lets us think we can sit back and just casually plod along the line into the future, to keep getting ever richer, healthier and more technologically advanced, but Who Should We Let in? Ian Hislop on the First Great Immigration Row (BBC2, Thursday) would have sent a little chill down the spines of the optimists among us. It presented history not as a straight line, but as an angry muddled spiral, looping endlessly back on itself.

Anyone who has read a smidgeon of recent history knows that Britain’s is one of decline.

In the Victorian era, she ruled the world but it all went sharply downhill after 1945.

Britain today seems smaller and meaner. As this programme showed, when she was in her feisty Victorian heyday, she extended a hand to all the immigrants and refugees of the world, and was proud to do so.

In 1853, The Times declared Britain was “the asylum of nations”. The country operated what we would now call an “open-door” immigration policy.

Of course, in this era Britain was clattering with factories and mills and was hugely rich.

Also, most immigrants came from continental Europe, so were white-skinned and familiar to the Brits.

Britain’s wealth and her staunch sense of pompous Victorian identity probably smoothed over any tensions.

In fact, Britain was so relaxed about immigration that she was accused of sheltering terrorists.

A French bomb-maker fled to Britain in the Victorian era and France threw the accusation that Britain was harbouring “laboratories of assassination”. When this chap went on trial, he eventually walked free.

So how did we get from this incredibly liberal immigration policy to our current hostile climate? In the early 20th-century, it all began to change.

Anti-semitism had become more widespread, and the British Brothers League was formed, “the first right-wing, protesting, bully boy gang.”

It’s easy to trace a parallel between Britain’s decline in wealth and power, and the loss of her robust sense of Empire-building identity, and the rise in hostility towards immigrants.

As the glory of Britannia dried up, the attitude towards foreigners became more pinched and resentful. Now that Britain is a land of austerity, division, and often global ridicule, it has hardened so much that Katie Hopkins feels able to say some immigrants “are feral humans”. Ian Hislop interviewed the notorious columnist and had his usual quizzical, amused expression as he asked her why she had called immigrants cockroaches. Hopkins protested it was meant as a compliment in that immigrants are tough and can endure a lot – a cockroach is said to be the only creature that could survive a nuclear war.

Immigration was said to be a main concern in the Brexit result, so it was annoying to see this valuable, thoughtful programme dabble in silly dressing-up games and Terry Gilliam-style animation.

But when the costumes and cartoons were shoved aside this was an important, and quite sad, look at this country.

Even those who dislike the UK can surely see something melancholy in the way the country has tumbled from a position of wealth and generosity to immigrants to becoming the land of the mean and nippy Brexiteer.

I’VE complained before that I hate revivals of old shows, particularly when they’re ones I loved in childhood and whose theme tune has never quite left my head. So I was on tenterhooks as I watched The Crystal Maze (C4, Friday): my heart was telling me to get ready to hate it – how dare they tamper with a classic! – yet my head was telling me to relax because Richard Ayoade is the new host.

The good news is that everything is the same, and the even better news is that Ayoade fits perfectly.

It would seem The Crystal Maze needs to be presented by a dapper, slim, eccentric Richard, and they’ve found one in Ayoade. Obviously, Britain is full of pretentious Dicks but, with O’Brien and Ayoade, what would look like pretension in a lesser man becomes style, wit and painfully dry sarcasm.

With his gold cane, his salmon-coloured suit, and weary asides to camera, Ayoade was a brilliant host, and was ruthlessly keen to mock the stupid contestants.

As they shoved and giggled and shouted useless advice to their team-mates, Ayoade stood at the back and occasionally offered some sensible hints in the form of leading questions.

But as the team were too hysterical and daft to listen, he sighed that they might as well be rhetorical questions.

Yes, the contestants were the one thing that marred my enjoyment of the show, and there was a very simple explanation for why they were so daft and loud: they were celebrities.

TV presenters, Essex girls, reality TV Geordies and a maddeningly camp choreographer took part in this first episode to raise money for a cancer charity, which was decent of them, I suppose, but they were so irritating and dim that I found myself unnaturally annoyed.

My admiration for Ayoade rose stratospherically as he managed to chide and corral them without once raising his cane and beating them to a wet pulp.

If the show can bring us ordinary Joes from now on, it will become essential Friday night viewing.