John McAfee, the antivirus software pioneer whose scandal-plagued life made him a staple of tabloid headlines, was found dead in a Spanish prison cell, after the high court ruled that he should be extradited to the US on charges of evading millions of dollars in taxes.

A Catalan justice official said McAfee’s body had been found in the Brians prison, south of Barcelona. The region’s justice department added in a statement that his death appeared to be suicide and that prison services tried and failed to revive him.

Earlier on Wednesday, Spain’s national court ruled that McAfee should be extradited to the US for “tax crimes relating to the years 2016, 2017 and 2018”.

McAfee had been taken into custody in Spain in October and held under preventive detention. In November, the US embassy delivered a formal request for his extradition. US authorities alleged that McAfee had earned more than €10m between 2014 and 2018 but had paid no tax and used frontmen to hide his wealth and income.

According to the US justice department, McAfee, who founded the antivirus software company that bears his name, hid millions of dollars of income from promoting cryptocurrencies and selling the rights to his life story.

In rambling testimony last week in which he discussed his political ambitions at length, McAfee, who had previously sought the Libertarian party nomination for the US presidency, told the Spanish court he had paid millions of dollars in tax and that his companies had paid billions. He claimed that the US tax authorities were corrupt.

He added that for someone of his age — almost 76 — he would certainly spend the rest of his life in prison if he were extradited to the US and asked the court to “consider these questions”.

But the prosecutor accused McAfee of exaggerating his political activity, describing him instead as a “tax rebel, a millionaire who does not want to pay taxes — which is a crime in every country, including the US”.

The court also dismissed McAfee’s health concerns as unsubstantiated, saying he was “not facing a perpetual sentence that would deprive him of liberty for life” if convicted.

McAfee struck a more confrontational tone when leaving the US on his yacht in 2019. “I have not paid taxes for eight years. I will not pay taxes again — it is unconstitutional and illegal,” he said in an interview with Agence France-Presse.

That flamboyant departure followed a series of dramatic exits that punctuated the final decade of his life. In 2011, he claimed to have fled the US out of concern that his life was in danger, taking up residence full-time in Belize.

A year later he disappeared after his neighbour died from a gunshot to the head, sparking a media frenzy. He was subsequently arrested in Guatemala and deported to the US. While he was named as a person of interest in the investigation, he was never charged in connection with the death.

Despite quitting his antivirus company more than a quarter of a century ago, McAfee’s name has remained closely associated with the computer security industry. Chipmaker Intel, which bought the company in 2010, announced after the Belize scandal that it would drop the name.

The brand stuck, however, and the McAfee name was retained when the company went public again last year, just two weeks after its founder’s arrest in Spain.