It turns out that a couple of purchases on iTunes helped to bring down the mastermind behind KickassTorrents, one of the most popular websites for illegal file sharing.

Apple and Facebook were among the companies that handed over data to the U.S. in its investigation of 30-year-old Artem Vaulin, the alleged owner of the torrent directory service. Vaulin was arrested in Poland on Wednesday, and U.S. authorities seized seven of the site’s domains, all of which are now offline.

KickassTorrents was accused of enabling digital piracy for years, and investigators said it was the 69th most visited website on the entire Internet. It offered a list of torrent files for downloading bootleg movies, music, computer games and more, even as governments across the world tried to shut it down.

The U.S. Department of Homeland Security initially uncovered information about Vaulin by tracing the IP addresses used to host the KickassTorrents domains, according to a 48-page criminal complaint.

That led investigators to a Canadian ISP, which turned over server data that revealed numerous files, including emails and user information about KickassTorrents’ operators.

At some point, investigators noticed that Vaulin had been using an Apple email account, at “tirm@me.com.” The account was used to make iTunes purchases from two IP addresses — both of which also accessed a Facebook account promoting KickassTorrents.

Vaulin’s Apple email account contained dozens of messages mentioning the file-sharing site, including about its operations and maintenance.

Although investigators tracked Vaulin to addresses in Ukraine, the complaint doesn’t mention how they finally apprehended him. He was arrested in Poland, and its unclear why Vaulin was there.

The U.S. is seeking his extradition and has charged him with copyright infringement and money laundering.

According to the complaint, KickassTorrents was generating quite a bit of revenue from online advertising. One bank account it used to accept advertising fees received $31 million in deposits over a 6-month period.

To secretly run KickassTorrents, Vaulin established a front company in Ukraine called Cryptoneat. Employees that worked there also operated the file-sharing site, the complaint alleges.

U.S. investigators have identified other individuals associated with KickassTorrents, but none of them were named in the complaint. It’s possible Facebook and Apple could be helping in those investigations as well. Both companies have said they will turn over user data to law enforcement as long as the requests comply with the law.

Neither KickassTorrents or Cryptoneat have responded to requests for comment. But in the meantime, a clone of the file-sharing site has already appeared and is calling for Vaulin to be released.

The clone site links to a petition on Change.org, which claims that the arrest of Vaulin is an attack on users’ Internet rights. “Our freedom to share is the human right which Artem Vaulin has been providing to millions of users,” it adds.

The petition so far has 812 supporters.