LOS ANGELES -- A judge has approved a settlement that will put "Happy Birthday to You" in the public domain.

U.S. District Judge George King approved the agreement Monday. It ends the ownership claims of Warner/Chappell Music, the music publishing company that has been collecting royalties on the song for years.

The company has agreed to pay back $14 million to those who have paid licensing fees to use the song.

Get Breaking News Delivered to Your Inbox

"This is a huge victory for the public, and for the artists who want to use 'Happy Birthday to You' in their videos and music," plaintiffs' attorney Daniel Schacht said, CBS Los Angeles reported.

"Everyone who has a birthday can celebrate," he continued. "Strong copyright protection is important for artists and content creators, but it must have limits. This landmark ruling recognizes the value of the public domain."

According to court records, the publisher acquired the company that previously claimed ownership of the number in 1988 for a reported $25 million. Warner/Chappell claimed that the copyright to the lyrics for the song would not expire until 2030, CBS Los Angeles reported.

Last year, King ruled that the company didn't own the lyrics to the ditty, one of the best-known and most beloved songs in the world. He said the company has no right to charge for the song's use.

Warner/Chappell has said it didn't try to collect royalties from just anyone singing the song but those who use it in a commercial enterprise.

Rupa Marya, leader of the band Rupa & the April Fishes, who recorded the tune three years ago at a San Francisco nightclub on the eve of her birthday, was among the plaintiffs. She said she was shocked when her attorney broke the news that she would have to shell out $455 to include it on her live album, CBS Los Angeles reported.

The song was apparently born in 1893, with a Kentucky schoolteacher and her older sister. Patty Smith Hill and Mildred J. Hill wrote the song for Patty's kindergarten students, titling it "Good Morning To All." The original lyrics Patty wrote were: "Good morning to you / Good morning to you / Good morning, dear children / Good morning to all."

The birthday lyrics were added later as an optional verse.