Image copyright University of Louisville Image caption A portion of a music manuscript for Happy Birthday's predecessor - "Good Morning to All"

The company collecting royalties for Happy Birthday To You does not hold a valid copyright to the song, a US federal judge has ruled.

Warner/Chappell acquired the copyright - which was originally filed in 1935 - in 1988.

But judge George King ruled that the original copyright was only granted for specific arrangements of the music, not the song itself.

The tune was composed by two Kentucky sisters in 1893.

Mildred and Patty Hill called their version Good Morning To All, which later evolved into the song that is popularly sung at birthday parties around the world.

Warner/Chappell had been collecting fees since 1988, when it bought Birch Tree Group, the successor to Clayton F Summy Co, which claimed the original copyright.

It is thought to have made $2 million (£1.3 million) a year by charging every time the song was used in a film, television episode, advertisement or other public performance.

The case against the publishers was launched in 2013 by Rupa Marya and Robert Siegel, who are making a film about the song.

When Warner asked for $1,500 (£970) for the right to use Happy Birthday To You in the film, Ms Marya and Mr Siegel argued the song was in the public domain and should not be subject to copyright fees.

Judge King ruled that Summy had never acquired copyright to the song's words.

'Thrilled'

"The Hill sisters gave Summy Co the rights to the melody, and the rights to piano arrangements based on the melody, but never any rights to the lyrics," he said.

Mark Rifkin, one of lawyers who acted for the plaintiffs, said he was "thrilled" by the judge's decision.

"We did exhaustive historical research and none of it showed that the publisher owned anything other than copyrights to four very specific piano arrangements," he told BBC Radio 4's Today programme.

"In the second part of the case, which hopefully we'll get to start very soon, we're going to be asking the court to order Warner to return all the money that's been collected from everyone who has had to pay a licensing fee or royalty to use the song... at least going back to 1988."

"If they've collected $2m a year over that period, that's a large sum of money."

After the ruling was announced, Warner/Chappell said: "We are looking at the court's lengthy opinion and considering our options."

Despite the ruling, the song still remains under copyright in the UK and other countries - and caution should be exercised over its use, says intellectual property lawyer Mark Owen.

"As elements of the song are still potentially within the maximum copyright term it may be the case that someone still owns some rights to it," said Mr Owen, a partner at law firm Taylor Wessing.

"There are also complex questions as to what the impact of this ruling may be on uses outside the US, so film-makers here should not now rush into using the song without considering the impact of this judgment carefully."