Spotify has reached an agreement with the National Music Publisher's Association (NMPA) over unpaid royalties. The streaming service will pay out around $21 million to publishers and songwriters in the deal, according to sources, with roughly $16 million set aside for royalty payments and a $5 million bonus fund for publishers and songwriters who opt in to the deal. The deal covers all content between Spotify's inception and June 30th, 2017

The streaming service has been the target of a few lawsuits surrounding unpaid royalties, the latest of which was demanding $150 million in damages. Spotify is hoping that this deal with the NMPA will placate most of the complaints from publishers and songwriters, and it can move on from those lawsuits, and they may be right. Back in 2011, the NMPA struck a deal with YouTube and most of its constituents opted in instead of attempting alternative lawsuits.

NMPA President and CEO David Israelite called the deal a victory for publishers and songwriters, and said the group would continue to push digital services to properly pay out royalties to all parties.

"We have always been committed to paying songwriters and publishers every penny."

"I am thrilled that through this agreement both independent and major songwriters will be able to get what is owed to them." Israelite said in a statement. "We must continue to push digital services to properly pay for the musical works that fuel their businesses and after much work together, we have found a way for Spotify to quickly get royalties to the right people. I look forward to all NMPA members being paid what they are owed, and I am excited about the creation of a better process moving forward."

Spotify also agreed to work with the NMPA to improve its royalty payment accuracy and efficiency, and will allow publishers to directly enter into an agreement with the streaming service, which will likely help it avoid more lawsuits in the future.

"We must continue to push digital services to properly pay for the musical works."

For its part, Spotify says it has always been committed to paying out what it owes to rights holders, and is working with the NMPA on a publishing administration system to keep these issues from arising in the future. "As we have said many times, we have always been committed to paying songwriters and publishers every penny," Jonathan Prince, Spotify's head of communications said. "We appreciate the hard work of everyone at the NMPA to secure this agreement and we look forward to further collaboration with them as we build a comprehensive publishing administration system."

Publishers and songwriters will be able to use a claiming portal to make claims for unpaid royalties or unmatched content beginning in April for a three month period. Any unclaimed funds after the three month period will be split up among publishers and songwriters based on their market share on Spotify.