A federal judge ruled on Tuesday that the lyrics to “Happy Birthday to You” are not protected by copyright, concluding that Warner/Chappell Music does not hold a valid claim to the song.

It raises the prospect that royalties will no longer be collected from public performances of the song in movies, TV shows and other productions.

The decision by U.S. District Judge George H. King is a victory for a filmmaker, Jennifer Nelson, making a documentary about the history of the song, who along with other plaintiffs challenged the the music publisher’s claim to the lyrics, allowing them to collect royalties for years.

King wrote that Summy Co. never acquired the rights to the lyrics in 1935, and as successor in interest to that publisher, Warner/Chappell “does not own a valid copyright.”

By some estimates, the publisher collected up to $2 million a year in royalties from the song.

Mark Rifkin, attorney for the plaintiffs, said that the decision means that the song is in the public domain. “There is no one, really, who can claim an ownership to the song,” he said.

A spokesman for Warner/Chappell said in a statement, “We are looking at the court’s lengthy opinion and considering our options.”

That “Happy Birthday” — one of the most sung songs in the world — was still under copyright protection at all comes as a surprise to many people.

The origin of “Happy Birthday to You” is traced to to a 1893 manuscript for sheet music that included the song “Good Morning to All,” which was written by Mildred J. Hill and her sister, Patty Smith Hill. The song was first published in 1893 in “Song Stories for Kindergarten,” and later the lyrics to “Happy Birthday” were adapted to the song’s melody.

King wrote that the record “shows that there are triable issues of fact as to whether Patty wrote the ‘Happy Birthday’ lyrics in the late nineteenth century and whether Mildred may have a shared interest in them as a co-author.” But “even assuming this is so, neither Patty nor Mildred nor Jessica ever did anything with their common law rights in the lyrics.”

“For decades, with the possible exception of the publication of ‘The everyday Song Book’ in 1922, the Hill sisters did not authorize any publication of the lyrics. They did not try to obtain federal copyright protection. They did not take legal action to prevent the use of the lyrics by others, even as ‘Happy Birthday’ became very popular and commercially valuable. In 1934, four decades after Patty supposedly wrote the song, they finally asserted their rights to the ‘Happy Birthday/Good Morning’ melody — but still made no claim to the lyrics.”

King wrote that Summy Co. acquired the rights to the melody, and piano arrangements based on the melody, but never any rights to the lyrics. The melody to the song entered the public domain in 1949 at the latest.

King wrote that another issue raised — whether the copyright interest in the lyrics was abandoned — is a triable issue.

Rifkin said that the next step in the case will be to determine if Warner/Chappell must return money it has collected through the years to license the song.

Warner/Chappell acquired the company that claimed ownership of the song, Birch Tree Group, in 1998. It has collected license fees for the use of the song in movies, TV shows and other music productions.

Warner Chappell bought Birch Tree Group, the successor to Summy, in 1998.

Nelson was joined by several other plaintiffs in the class action, including Rupa Marya and Robert Siegel.

“I hope we can start reimagining copyright law to do what it’s supposed to do–protect the creations of people who make stuff so that we can continue to make more stuff,” Marya said in a statement. “This ruling has forever changed the current perversion of copyright which protects corporations’ ability to exploit content and copyright law for their own interest.”

Nelson’s Good Morning to You Prods. was represented by Rifkin, Randall Newman, Francis Gregorek and Betsy Manifold of Wolf, Haldenstein, Adler, Freeman & Herz. Warner/Chappell is represented by Glenn Pomerantz and Kelly Klaus of Munger, Tolles & Olson.