Anti-virus software creator John McAfee, who is wanted in the US for tax evasion, has been arrested at Barcelona airport, police said.
Officers detained the 75-year-old on Saturday as he was about to board a flight to Istanbul.
He is being held at a jail near Barcelona awaiting extradition to the US, a Spanish police source told AFP news agency.
His arrest comes a day after US prosecutors released an indictment against Mr McAfee for allegedly failing to report income made from promoting crypto-currencies, making speaking engagements and selling the rights to his life story for a TV documentary.
The indictment, which was issued in June but only unsealed yesterday, said Mr McAfee failed to file tax returns from 2014 to 2018, despite receiving "considerable income" from several sources.
Mr McAfee allegedly evaded taxes by directing his income to be paid into bank accounts and crypto-currency exchange accounts in the names of others, according to the indictment.
He is also accused of evading the US tax office by concealing assets, including real estate, a yacht and a car, by putting them in the name of others.
US officials issued an arrest warrant through Interpol and have asked for his extradition, according to Spanish police.
Since making a fortune with his eponymous antivirus software in the 1980s that still bears his name, Mr McAfee has become a self-styled crypto-currency guru, claiming to make $2,000 a day.
He has nearly one million followers on Twitter.
He made tabloid headlines after moving to Belize and his neighbour in the Central American country was mysteriously murdered in 2012, a crime that remains unsolved.
When the police found him living with a 17-year-old girl and discovered a large arsenal of weapons in his home, Mr McAfee disappeared on a month-long flight that drew breathless media coverage.
The dead neighbour's family later filed a wrongful death suit against Mr McAfee and last year a court in Florida found against him, ordering him to pay the family more than $25m.
In 2015, Mr McAfee was arrested in the US for driving under the influence. He again disappeared from view until January 2019, when he fled the country.