WASHINGTON - A 22-year-old British citizen was arrested in Spain on Wednesday in connection with a July 2020 hack of Twitter, which compromised the accounts of high-profile politicians and celebrities, the U.S. Justice Department said on Wednesday.

It named the British man as Joseph O'Connor and said he was arrested on multiple charges, and also accused in a criminal complaint of computer intrusions related to takeovers of TikTok and Snapchat accounts, as well as cyberstalking a juvenile.

The July 2020 Twitter attack hijacked a variety of verified Twitter accounts, including then-Democratic candidate Joe Biden and Tesla CEO Elon Musk. The accounts of former President Barack Obama and TV reality star Kim Kardashian were also hit.

The alleged hacker used the accounts to solicit digital currency, prompting Twitter to take the extraordinary step of preventing some verified accounts from publishing messages for several hours until security to the accounts could be restored.

(Reporting by Sarah N. Lynch; Editing by Chizu Nomiyama and Alexandra Hudson) ((sarah.n.lynch@thomsonreuters.com; 202-579-0289;))