Image copyright Thinkstock

A legal dispute over copyright fees for the song Happy Birthday To You has been settled out of court.

The music company Warner/Chappell had claimed the rights to the song but earlier this year a judge ruled that the lyrics could be used without the need to pay royalties.

A group of artists and filmmakers had sought to claim back the money collected by the firm over the years.

The terms of the agreement have not been revealed.

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

It acquired the copyright in 1988 but a judge ruled it was only granted for specific arrangements of the music, not the song itself.

In a statement the company said: "While we respectfully disagreed with the court's decision, we are pleased to have now resolved this matter."

The lawyer for the artists, Mark Rifkin, told Reuters he was pleased with the agreement but did not give any further details.

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.