Starting this winter, the FBI was engaged in a lengthy legal battle with Apple that demanded the iPhone manufacturer unlock the smartphones of a suspected terrorist and a suspected drug dealer.

As a public debate intensified over whether Apple should unlock the smartphones, Apple was quietly providing the FBI with other private information to catch a different kind of criminal.

Apple provided the FBI with records of an account that the US Department of Justice alleges belongs to the owner of the world’s largest torrent site. (Torrent is short for BitTorrent, a technology used to distribute files over the internet, which can be used toward either positive or negative ends.) The records Apple turned over were instrumental in arresting Ukrainian national Artem Vaulin, who was living in Poland, and charging him with copyright infringement and money laundering.

Prosecutors allege Mr. Vaulin was the quarterback of the illegal reproduction and distribution of a billion dollars worth of illegally copied movies, video games, TV shows, and music albums.

Apple’s involvement in the arrest of Vaulin shows its willingness to cooperate with the government on certain matters, particularly because Apple is a heavyweight in the music industry, even while holding the line against violating the security of millions of its consumers.

The records Apple provided the FBI were one of the last puzzle pieces in arresting Vaulin. According to the affidavit, Special Agent Jared Der-Yeghiayan of Homeland Security Investigations led the effort in identifying Vaulin. Mr. Der-Yeghiayan posed as an advertiser for the file-sharing site Kickass Torrents (KAT), which, according to Alexa Internet that provides commercial web traffic rankings, is one of the 100 most popular sites on the Internet.

After Der-Yeghiayan suspected an Apple email (tirm@me.com) was linked to Vaulin, the FBI reached out to Apple. The records Apple provided showed that the account, used to make to legal purchases through Apple’s iTunes store, was linked to the Facebook account of KAT, and received hundreds of emails about KAT. When KAT began accepting Bitcoin donations in 2012, its Bitcoin account was registered through tirm@me.com.

With this evidence, the Justice Department charged Vaulin with conspiracy to commit criminal copyright infringement, conspiracy to commit money laundering, and two counts of criminal copyright infringement. It has requested Poland extradite Vaulin to the United States.

Apple has a strong interest in the collapse of the file-sharing site, as it stood to earn a significant chunk of the $1 billion worth of entertainment spending that KAT rerouted.

The iTunes Store has been the largest music store in the world since 2010, and brought in $25 billion through 2014. In June 2015, the company launched Apple Music, a subscription streaming service.

By contrast, Apple has no financial incentive to share its encryption with the FBI.

When the FBI asked Apple to unlock the iPhones of one of the San Bernardino, Calif., terrorists and a suspected Brooklyn drug dealer, the company stood on principle, saying it refused to violate the privacy of its consumers.

Although the FBI argued the encryption would only unlock those two phones, Apple said that was impossible: “Writing code to bypass strong security features in his products, chief executive officer Tim Cook says, would amount to a government backdoor that could unlock all sorts of devices and compromise the security of millions of consumers,” as Malena Carollo reported for The Christian Science Monitor in March.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

In Vaulin's case, however, Apple apparently agreed with Zachary Fardon, the US attorney involved in prosecuting the Ukranian.

“Copyright infringement exacts a large toll, a very human one, on the artists and businesses whose livelihood hinges on their creative inventions,” said Mr. Fardon in a statement. “Vaulin allegedly used the internet to cause enormous harm to those artists.”