John McAfee, the creator of the McAfee antivirus software, has been found dead in his cell in a jail near Barcelona, a government official told The Associated Press.

Hours earlier, a Spanish court issued a preliminary ruling in favour of his extradition to the United States to face tax-related criminal charges.

Security personnel at the Brians 2 penitentiary near the north-eastern Spanish city tried to revive McAfee, who was 75, but the jail’s medical team finally certified his death, a statement from the regional Catalan government said.

“A judicial delegation has arrived to investigate the causes of death,” the statement said, adding that “Everything points to death by suicide.”

Anti-virus software founder John McAfee (Alan Diaz/AP)

The statement did not identify the US tycoon by name, but said he was a 75-year-old US citizen awaiting extradition to the country.

Spain’s National Court on Monday ruled in favour of extraditing McAfee, who had argued in a hearing earlier this month that the charges against him were politically motivated and that he would spend the rest of his life in prison if he was returned to the US.

The court’s ruling was made public on Wednesday and could have been appealed against. Any final extradition order would have also needed to get approval from the Spanish Cabinet.

Tennessee prosecutors charged McAfee with evading taxes after failing to report income made from promoting cryptocurrencies while he did consultancy work, as well as income from speaking engagements and selling the rights to his life story for a documentary.

The criminal charges carry a prison sentence of up to 30 years.

The Gloucestershire-born entrepreneur was arrested last October at Barcelona’s international airport. A judge ordered at that time that McAfee should be held in jail while awaiting the outcome of a hearing on extradition.