YouTube has agreed to pay licensing fees to the National Music Publishers Association (NMPA), ending a four-year battle between the Google-owned company and over 3,000 independent music publishers.

In 2007, NMPA filed a class-action lawsuit against YouTube, alleging the popular video sharing site infringed on songwriters’ rights by hosting videos that featured copyrighted songs. YouTube will now pay songwriters a cut of advertising revenue from videos featuring licensed music, including videos with covers of a licensed song. The terms of the royalty agreement remain confidential.

"We are now going to be business partners in these videos, and we all get to share in that revenue," said David Israelite, NMPA's president and chief executive.

The LA Times reports that NMPA members have until mid-September to decide if the terms of the new deal are agreeable or if they wish to pursue further legal action on their own.

In addition to NMPA, YouTube currently has separate licensing contracts with four major publishing houses including EMI, Universal, Warner, and Sony. BMG Chrysalis, the world’s fourth-largest music publisher, is one major holdout, restricting access to works by such artists as Blondie, David Bowie, and Michael Jackson.