The Warner/Chappell Music Inc may now have to refund as much $2 million a year it collected in royalties whenever the "Happy Birthday to You" song was performed in movies and on TV, reports said.

A Los Angeles court on Wednesday announced that music production company Warner/Chappell has decided to relinquish its claim to the "Happy Birthday to You" song in an out-of-court settlement.

According to AFP, the details of the settlement have not been made public yet. The music publisher who earned millions by enforcing its copyright have been fighting a legal battle for the last two years over the most widely sung tune in the English language.

Back in September, US district judge George H King had ruled that Warner/Chappell Music Inc did not own the lyrics of the song, and hence the song should be made part of the public domain as the company had no right to charge for its use.

The original song was written in 1893 by Patty Smith Hill, a Kentucky kindergarten teacher, and her sister Mildred J Hill, who titled it "Good Morning To All". The song was later published in a children's song book. The lyrics "Happy Birthday" were only added later into the song.

Warner bought over the rights to "Happy Birthday" in 1988, when it purchased Birch Tree Group, the successor to Summy, according the Los Angeles Times.

It is estimated that Warner collected as much as $2 million annually in royalties through the song.