Online music piracy across the world "declined significantly" in 2012, according to a new report.
The NPD Group said last year the number of users on peer-to-peer (P2P) illegally downloading music fell by 17% - down to 21 million worldwide.
The market research firm cited an increased use of legal streaming music sites as being behind the drop.
It comes as a separate report noted that global music revenues had risen for the first time since 1999.
The International Federation of the Phonographic Industry (IFPI) said that accelerating digital music sales had caused a 0.3% upturn in global revenues - a total of $16.5bn (£10.9bn). A small boost, but it is the first year of growth for well over a decade.
"It is hard to remember a year for the recording industry that has begun with such a palpable buzz in the air," said Frances Moore, chief executive of IFPI.
"These are hard-won successes for an industry that has innovated, battled and transformed itself over a decade.
"They show how the music industry has adapted to the internet world, learned how to meet the needs of consumers and monetised the digital marketplace."
The NPD Group's report, based on its annual study of music consumers, said that at P2P file sharing's peak, in 2005, as many as 33 million people used the services - one in five of all internet users aged 13 and older.
But in 2012 that number was measured as being down to 21 million people.
The report said as many as 40% of people who used illegal music services in 2011 stopped doing so in 2012.
Of those, 20% said this was due to the fact the illegal service they were using had been shut down, or had contained spyware and viruses.
More than half the users who stopped using illegal sites said they now preferred legal services such as the UK-headquartered Spotify.
The music industry has undertaken a sizable campaign over several years to see illegal sites and services put out of business.
In the UK, the British Phonographic Industry (BPI) took action to the courts, obtaining a court order to force internet service providers to block access to file-sharing site The Pirate Bay.
The Pirate Party UK - a political group that campaigns for an "open" internet - launched a proxy service to allow UK users to circumvent the block of The Pirate Bay, but that too was closed following legal threats from the BPI.
"In recent years, we've seen less P2P activity, because the music industry has successfully used litigation to shut down [P2P client] Limewire and other services," said Russ Crupnick, senior vice president of NPD.
"Many of those who continued to use P2P services reported poor experiences, due to rampant spyware and viruses on illegal P2P sites."
Despite the seemingly good news, controversial measures to curb piracy further are still taking place.
On Tuesday, the "six strikes" campaign - where users engaging in piracy are given six warnings before action is taken - came into force in the US.
The music industry has also started to refocus its efforts by targeting those who make profiting from illegal music possible, such as advertisers, as well as the piracy sites themselves.
Elsewhere, search engines like Google have been pressured to demote piracy websites in their search results.
More needs to be done on that front, IFPI said: "Searches for the names of popular artists followed by the term "mp3" still return a large number of results for illegal sources on the first page.
"In August 2012, Google announced it would take into account the number of valid copyright notices it receives when returning search results.
"That was a welcome step in principle but unfortunately has not been translated into results."