Both YouTube and the music rights organization, known by its German acronym GEMA, hailed the deal. YouTube declared it a victory for musicians, saying they could reach “new and existing fans in Germany,” while GEMA said its 70,000 members would receive “fair remuneration” when their works were played over the platform.

Neither side published the details of the agreement.

“We remained true to our position that authors should also get a fair remuneration in the digital age, despite the resistance we met,” Harald Heker, GEMA’s chief executive, said in a statement. He added that the agreement covered future royalties, as well as those accrued over the last seven years.

The dispute has played out in a series of court cases.

In 2012, a Hamburg court ordered Google, YouTube’s owner, to install filters to detect and stop people from watching material to which the internet conglomerate did not own the rights, or face a fine of 250,000 euros, or about $275,000.

In January, however, a Munich court ruled against GEMA, which was seeking €1.6 million in damages over a selection of music that was to be compensated with 0.375 euro cents each time a song was played.

Under the deal announced on Tuesday, both sides have agreed to drop all pending court cases.

Germany’s justice minister, Heiko Maas, welcomed the agreement as a “great step forward” in attempts to hold internet providers such as Google, Facebook and Twitter accountable for the content they distribute.