Boris Berezovsky outside the court in London after losing his lawsuit against Roman Abramovich. ITN

At 10.15am on Friday Boris Berezovsky strolled into London's high court. He was relaxed and smiling. Asked whether he was about to win his battle against his former friend and fellow oligarch Roman Abramovich, he replied: "I'm confident. I believe in the system."

Fifteen minutes later the same English justice system – in the formidable shape of Mrs Justice Gloster – gave Berezovsky an almighty and devastating kick up the backside. The judge dismissed his case and his claim that he was a partner with Abramovich in the Russian oil group Sibneft. But worse than this she also demolished Berezovsky's character, describing him in her judgment as "dishonest", "unreliable" and even "deluded".

Instead of emerging with $5bn (£3.15bn) in damages, as he had hoped, Berezovsky left with a huge legal bill and his reputation in tatters. He had told the court that Abramovich, the owner of Chelsea FC, had intimidated him to sell his share in the oil firm Sibneft at a massive discount. Abramovich vehemently denied this.

But who would the judge believe? At 10.30am Gloster walked into court. There was a dramatic hush. The first three rows were packed with lawyers – the true winners in this, the biggest private litigation battle in history. There were journalists and supporters. Berezovsky sat near the door. Two bodyguards with earpieces were behind him. Abramovich wasn't there, his whereabouts a mystery. "He's probably on his yacht in Corfu or Marbella," someone whispered.

First, Gloster threw out Berezovsky's case. Then she gave her reasons. They were withering, in the kind of remorseless language rarely heard in the high court. Berezovsky, we discovered, had destroyed himself early on in the witness box. "On my analysis of the entirety of the evidence, I found Mr Berezovsky an unimpressive, and inherently unreliable, witness, who regarded truth as a transitory, flexible concept, which could be moulded to suit his current purposes," the judge said.

Berezovsky clutched his face. She went on: "At times the evidence which he gave was deliberately dishonest; sometimes he was clearly making his evidence up as he went along in response to the perceived difficulty in answering the questions in a manner consistent with his case.

"At other times, I gained the impression that he was not necessarily being deliberately dishonest, but had deluded himself into believing his own version of events. On occasions he tried to avoid answering questions by making long and irrelevant speeches, or by professing to have forgotten facts which he had been happy to record in his pleadings or witness statements."

It was Berezovsky's most excruciating moment, and the worst since he fled to Britain in 2000. Berezovsky left Russia after falling out with the steely Vladimir Putin, and has been a bitter critic of the Kremlin ever since. President Putin has had a grudge against the British judicial system since it granted Berezovsky political asylum in 2003. Putin could have been forgiven for allowing himself a wry grin, as another court comprehensively trashed Berezovsky's reputation.

Abramovich, by contrast, has been a model of political loyalty. He is said to be on good terms with Putin. Many have wondered how the diffident and unassuming Abramovich became one of the richest people on the planet. The case provided the answer, with even Berezovsky admitting he was "very charming". In his witness statement Berezovsky said that Abramovich's secret was simple: he was "good at getting people to like him".

Certainly some of this appears to have worked on Gloster. The judge told the court she concluded Abramovich was a "truthful and on the whole reliable witness". He "gave careful and thoughtful answers, which were focused on the specific issues about which he was being questioned." She added: "At all times, he was concerned to ensure that he understood the precise question, and the precise premise underlying the question which he was being asked."

Forty minutes into the judgment, it was clear Abramovich had won game, set and match. The judge dismissed in "its entirety" Berezovsky's claim that he had been a partner in Sibneft, set up in the mid-1990s when Russia's then president, Boris Yeltsin, practically gifted state assets to a small group of well-connected businessmen: the oligarchs. (In return they helped him dubiously win Russia's 1996 election.) She also rejected a second Berezovsky claim for $564m, his alleged share of a joint interest with Abramovich in the aluminium group Rusal.

Instead, Gloster accepted Abramovich's version of history: that he had been compelled to hire Berezovsky for his political connections. Back in 1994 Berezovsky was Yeltsin's occasional tennis-partner and a powerful figure in the corridors of the Kremlin. Abramovich was a young and ambitious oil trader. Gloster accepted the relationship had been one of "krysha" – the Russian word for roof – with Berezovsky giving Abramovich physical and political protection, indispensable in the murky world of Russian business. (The judge prounounced "krysha" to rhyme with Trisha, rather than the Russian way, "kreesha".)

The judge even ruled that Putin hadn't tried to intimidate Berezovsky into selling his TV channel ORT, during an uncomfortable Kremlin showdown in 2000, shortly before Berezovsky fled. Her finding prompted seasoned Russian watchers to guffaw. Afterwards, a stunned Berezovsky emerged into the corridor. The judge had tried to rewrite Russian history, he said, adding that his faith in British justice had now been badly shaken. Had he expected to win? "Absolutely."

In the street outside, Berezovsky said he hadn't decided yet whether to appeal – a tricky step, one suspects, given the judge's devastating comments. "I'm absolutely amazed what happened today. I'm surprised completely," Berezovsky said. He added: "Sometimes I had the impression Putin himself wrote this judgment." The oligarch said he didn't regret bringing the case, and even attempted a phlegmatic note, observing: "Life is life," before speeding off in a black Mercedes.

Abramovich's lawyers said they were pleased their client had been "comprehensively vindicated". They added: "We appreciate that, to many people, this case has been a uniquely Russian one, and should therefore have been heard in the Russian court system. Nevertheless, Mr Abramovich has always had great faith in the fairness of the English legal system and is both pleased and grateful for today's outcome."

All that remains now is to tot up the legal bills. The court heard that Berezovsky had recently sold his luxury home in Wentworth, Surrey, and was busily "disposing of assets". This has fuelled rumours that the one-time billionaire is now down to his last few millions, a pauper by the standards of Russia's elite. Berezovsky said he would not discuss his assets.

As well as the elusive Abramovich, one other person was missing from the lop-sided drama: Abramovich's barrister Jonathan Sumption QC. Sumption realised early on that the key to the case was character, and convincing the judge Berezovsky was a wrong 'un. The strategy worked. He has more than earned his fee – rumoured to be in excess of £1m. And what's more he is now a supreme court judge and a lord, further proof perhaps that Britain is good at delivering justice.