It's a victory for Katy Perry after a federal judge ruled in her favor in a case alleging that she and her collaborators copied her 2013 hit “Dark Horse” from a Christian rap song from 2009 called "Joyful Noise" by Marcus Gray.

The song in question was found to not have enough distinct similarities to the 35-year-old pop star's tune to be protected by copyright.

“It is undisputed in this case, even viewing the evidence in the light most favorable to plaintiffs, that the signature elements of the eight-note ostinato in ‘Joyful Noise’ is not a particularly unique or rare combination,” Snyder wrote in her decision.

PENELOPE CRUZ DEFENDS JOHNNY DEPP AMID AMBER HEARD LEGAL DRAMA

This particular verdict follows an appeal filed by Perry when a California jury found her guilty of ripping off the song over six months ago.

Perry and her collaborators -- Dr. Luke, Max Martin and Circuit -- initially were set to fork over $2.78 million to Gray and his team. Perry was ordered to pay $550,000 personally.

Gray and his team plan to appeal.

The lawsuit began in 2014 when Gray initially sued Perry over "Dark Horse," which spent several weeks on Billboard's Hot 100, including four at No. 1.

CORONAVIRUS OUTBREAK COULD 'BACKLOG' LORI LOUGHLIN CASE, DELAYING TRIAL, SAYS LEGAL EXPERT

Perry and her and her co-writers all testified that they had never before heard “Joyful Noise.”

The award had fallen far short of the $20 million the plaintiffs had sought, and is not a huge amount for stars of the caliber of Perry or the hitmaking producer Dr. Luke, but her attorney Christine Lepera called the verdict a “travesty of justice” that would have a chilling effect on creativity.

CLICK HERE TO GET THE FOX NEWS APP

Lepera did not immediately respond to an email seeking comment on the overturned verdict.

The Associated Press contributed to this report