image copyrightAFP/REUTERSimage captionKim Kardashian and Kanye West, Elon Musk, Bill Gates and Barack Obama were all "hacked"

Spanish police have arrested a 22-year-old UK citizen in connection with the hacking of 130 high-profile Twitter accounts, including those of Elon Musk, Barack Obama and Kanye West.

The hacked accounts tweeted followers, encouraging them to join a Bitcoin scam, in July last year.

Also charged with hacking TikTok and Snapchat, Joseph O'Connor faces charges including three counts of conspiracy to intentionally access a computer without authorisation and obtaining information from a protected computer.

  • Twitter hack: 130 accounts targeted in attack
  • Teen 'mastermind' pleads guilty to celeb Twitter hack
  • Twitter hack: What went wrong and why it matters

The San Francisco Division of the Federal Bureau of Investigation (FBI) has been investigating the case, helped by the Internal Revenue Service Criminal Investigation Cyber Crimes Unit and the United States Secret Service.

Previously, authorities had charged three men in relation to the breach, a 19-year-old, from Bognor Regis, another teenager and a 22-year-old from Florida.

Hackers took control of public figures' accounts and sent a series of tweets asking followers to transfer cryptocurrency to a specific Bitcoin wallet to receive double the money in return.

As a result, Twitter had to stop all verified accounts from tweeting.

The social-media company later said the hackers had targeted Twitter employees to steal credentials to access the systems.