Music streaming service Spotify has struck a deal over unpaid royalties to U.S. music publishers.

The agreement between trade group National Music Publishers’ Association and Spotify will see the Swedish-based service pay publishers and songwriters between $16 million and $25 million, along with a $5 million “bonus fund,” sources told both the New York Times and The Verge.

In exchange, the Times reported, publishers could choose not to move forward with copyright infringement claims against Spotify. Last year, a class action lawsuit was filed against the company seeking $150 million over the distribution of copyrighted content without license.

Spotify isn’t the only tech company the NMPA has sought to settle with over licensing matters—in 2011, YouTube agreed to make a $4 million advance payment for publishing royalties on songs used in user-generated YouTube videos.

The Spotify-NMPA deal counts as a win for a music industry that has constantly battled with streaming platforms, where as much as 25% of activities on these services could be unlicensed, the Times reported. “I am thrilled that through this agreement both independent and major publishers and songwriters will be able to get what is owed to them,” NMPA president and CEO David Israelite said in a statement.

In return, Spotify could woo back artists like Taylor Swift and Adele who have had conflicts with the company over its royalty terms. “As we have said many times, we have always been committed to paying songwriters and publishers every penny,” Spotify global head of communications and public policy Jonathan Prince said in a statement.