YouTube and Roku announced a multi-year agreement on Wednesday, putting an end to a months-long struggle over claims of anti-competitive behavior that threatened to remove the internet's most popular video streaming service from tens of millions of TVs.

The firms announced on Twitter that "Roku and Google have agreed to a multi-year extension for both YouTube and YouTube TV"

YouTube Logo, history, meaning, symbol, PNG

"This agreement represents a positive development for our shared customers, making both YouTube and YouTube TV available for all streamers on the Roku platform."

Since April, YouTube owner Alphabet's Google and streaming platform Roku have been at odds over technical and financial terms for delivering YouTube's primary app and YouTube TV service.

Roku had fought against what it called unfair terms including favoring YouTube in search results and updating its hardware. YouTube has characterized its efforts as "consumer-friendly," claiming that Roku was abusing its market power to get a better bargain.

In the broadcast and streaming video industries, public battles over distribution agreements and ad income share have grown commonplace.

After the deal for the YouTube TV app expired, Roku pulled it from its channel store. YouTube, which has over 2 billion monthly users, threatened to remove its main app off Roku on Thursday when the service's contract was set to expire.

The fact that popular apps like YouTube are incorporated into Roku televisions and streaming media players is a major selling point for the hardware. Despite the fact that Roku's consumers might get YouTube's services in other ways, the multi-year arrangement protects Roku's company.

Last month, Roku announced that the company has 56.4 million active accounts.