The queasiness keeps coming back, a very specific malady that I thought I’d put behind me nearly 20 years ago. But each time I read about, say, the bogus version of the Lisbon treaty that’s gone viral, or the “malicious hoax” of the Momo challenge, or the rise and rise of the anti-vaxxer movement, the symptoms return, stronger than ever.

If asked by a doctor to describe the sensation, I’d say it feels as if the ground beneath my feet is slipping away, that there is nothing firm or solid to stand on. What triggers it are lies, usually in the public sphere, told by those with power and authority. And it’s not just any old lie, but rather the lie that is smirkingly cavalier in its disregard for the difference between truth and falsehood, that suggests you can never really tell the difference between the two and that it doesn’t matter anyway.

The ailment first returned in earnest in 2016, just as Oxford Dictionaries anointed as its word of the year “post-truth”, which it defined as “relating to or denoting circumstances in which objective facts are less influential in shaping public opinion than appeals to emotion and personal belief”. This was the year of £350m on the side of the bus – a figure that stayed there, even after the head of the UK Statistics Authority wrote to the leave campaign to say it was wrong. And this was the year Donald Trump sought and won the US presidency, establishing a pattern of serial lying that has continued without let-up to this day. One tally records that Trump has made around 4,500 false claims since entering the White House, at a rate of nearly six per day.

Of course, this kind of lying was not born in 2016. The acknowledged master of the form is Vladimir Putin, and he has been engaged in state-sponsored falsehood for years. Witness the way he denied with a straight face that Russian troops were even in Crimea, let alone that they had invaded it, only eventually to decorate those same Russian soldiers for their bravery and service there. Note too the way his mouthpiece network, Russia Today (now RT), aired any and every conspiracy theory to explain the downing of Malaysia Airways flight MH17 over Ukraine, deliberately throwing up a cloud of fog to obscure the evidence that it was, in fact, a Russian missile that had brought the plane down.

The peddlers of post-truth have motivations in common – chiefly, the understanding that if you can’t persuade the public, filling them with doubt is a good second best, and that a confused public is easier to manipulate than an informed one – but they also share a basic modus operandi. Its most fundamental technique is denial. You have to be willing to deny the evidence of experts, of course, as well as journalists, but also the testimony of eyewitnesses, of perpetrators and of the written record. Anything, in other words, that would ordinarily count as proof.

This method, though brazen and outlandish, is hardly new. The world was offered a demonstration of it in 2000, played out in Court 73 of the high court in London. I was there for several of those long midwinter days, watching proceedings. Indeed, it was there that I first felt that very peculiar queasiness, an experience that led to my latest novel, To Kill the Truth, written under the alias Sam Bourne.

Rachel Weisz as Deborah Lipstadt in the film Denial, which is based on the Irving case. Photograph: Courtesy Everett Collection/Allstar/Shoebox Films

I’m referring to the libel case brought by David Irving against the American academic Deborah Lipstadt along with her publisher, Penguin. Irving called himself a historian, but Lipstadt identified him as a Holocaust denier. He insisted that defamed him. His argument, in essence, was that he could not be a Holocaust denier because there was no Holocaust to deny. The Holocaust as we ordinarily understand it – the deliberate murder of six million Jews by the Nazis – had never happened.

It was quite a scene in that courtroom. On one side, there was Lipstadt and her legal team – I counted 11 of them, including Anthony Julius, the scholar solicitor who had acted for Princess Diana in her divorce. They were surrounded by stacks of paper, big towers of files, and a bank of laptop computers. And on the other, sat Irving – who had chosen to defend himself– alone. I suspected he liked it that way. He could play the plucky underdog. David against Goliath.

Each day, the defence team would present the documentary proof that confirmed the truth of the Holocaust and each day Irving would brush it aside. Let’s say he was confronted with the eyewitness testimony of a survivor of one of the Nazi death camps. Irving would dismiss it as “a matter for psychiatric evaluation” – suggesting the survivors were out of their minds. That was if he were in a gentle mood. Alternatively, he would imply that Holocaust survivors were con artists, bent on tricking the world into sympathy or into making compensation payments, all part of a global Jewish plot to guilt-trip the human race. Either way, their testimony could be discarded.

Well, what about this, the defence would say, waving the documented confession of a senior Nazi – a man such as Hans Aumeier, the second highest-ranking Nazi officer at Auschwitz. When Aumeier was interrogated after the war by British intelligence officers, he described the extermination process in great detail. His account matched what the survivors had said precisely. But that was not good enough for Irving. “British army officers ... had ways of making people talk,” Irving quipped. He was implying that Aumeier’s confession had come under duress, the words beaten out of him. And the same went for any Nazi confession of the Holocaust. In Irving’s view, you couldn’t believe a word of it.

That left two types of evidence, physical and documentary. The physical evidence was tricky, since the Nazis went to great pains to destroy the death camps – completely in the case of Treblinka, Chełmno and Sobibór – or at least to detonate the gas chambers, as they did at Auschwitz. The ones there were still intact, but their ceilings had collapsed. That allowed Irving to say no one could know for certain what they had been used for.

And so we were left with the documents. The defence produced a blizzard of them – architects’ drawings of the gas chambers; records of the delivery of Zyklon B, the poison gas that was used to kill Jews and other prisoners; memorandums from Nazi officials; minutes of meetings. One by one, Irving would point out a supposed irregularity – a dodgy margin here, a serial number out of sequence there – tell-tale signs that “proved”, he said, that the document in question could not be real. That it had been faked.

This was how Irving tried to deny the Holocaust. You couldn’t believe the witnesses or the perpetrators: they were all lying. You couldn’t look at the scene of the crime, because it was all too long ago – the evidence had been washed away by time. And you couldn’t trust the documents, because they might all be forgeries.

I sat there watching this, day after day. And then one afternoon, as I left the court, I had that strange sensation. It was physical, like seasickness. The ground beneath my feet seemed unsteady, as if the earth itself was falling away.

Irving was saying we can’t trust anything – not even thousands of witnesses. Where did that leave what we call history?

It took me a while to understand what this feeling was. But slowly I understood it as a physiological reaction to the world Irving was showing us – a world where nothing was certain, where nothing was firm or solid, where even the most basic facts were in doubt.

He was trying to dispense with something human beings find essential for life – the ability to draw conclusions from evidence. He was saying that we can’t trust anything – neither records, nor the testimony of tens of thousands of witnesses. And if he was right, then where did that leave what we call history? If we can’t know that the Holocaust happened, how could we know that Napoleon fought at Waterloo or that Henry VIII had six wives? How could we know anything? He was luring us into a world without facts, where everything could be a lie, a conspiracy, a legend, a hoax. A world where the ground swallows you up in doubt.

A couple of months later I sat in court as the judge delivered his verdict. Irving lost. The judge called him a “pro-Nazi polemicist”, a fraud who doctored the historical record to promote his own racist agenda. He was not a historian at all. The Holocaust was real and Irving was the fake.

I was relieved. I felt as if we had looked over the precipice, into the bizarre, never-never world of Irving, but we had stepped back. We had, through the courts, declared that we wanted to live in the realm of facts and truth. We could sleep soundly once more.

But by 2016, that slumber was over. It was now clear that the truth was under assault once again. Not from a crank who called himself a historian, but from Trump, from the Brexiters, from the Kremlin, all of them united in their disregard for whether a statement is true or false.

Today’s threat to the truth also comes from a social media whose algorithms prefer virality to veracity, where lies spread faster than facts. It comes from ideologues happy to dismiss overwhelming scientific evidence, whether on climate change or the safety of vaccination, as breezily as those who once insisted that the Earth was flat. It comes from a technology now so advanced that it can create false evidence, in the form of deepfake video, audio and text.

All this got me thinking. What if a new Irving were to emerge, not here but in the US, an Irving bent on denying the greatest crime in American history? What if he went to court to argue, in the face of all the evidence, that slavery had never happened? And what if someone deployed state-of-the-art technology to go even further and erase all evidence of the past?

That queasy, seasick feeling I felt on leaving the High Court in 2000 has returned. And now I see the Irving trial differently. Not as a distant memory but as a preview of the current era. That trial was the trailer – and now we’re living through the movie.

• To Kill the Truth by Sam Bourne is published by Quercus (£12.99). To order a copy go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £15, online orders only. Phone orders min p&p of £1.99.

• This article was amended on 12 March 2019. An earlier version referred to Nazi officer Hans Almeyer. His surname has been corrected to Aumeier.