Katy Perry has won her 'Dark Horse' plagiarism case.

The 'Roar' hitmaker and several others were ordered to pay $2.78 million in damages after a jury ruled the 2013 hit copied a Christian rap song.

The 37-year-old singer was told she would have to fork out $550,000 and that her label Capital Records owed nearly $1.3 million after a federal jury in Los Angeles found parts of Katy's tune - which was number one on the Billboard Hot 100 chart for four weeks in 2014 - resembled Flame's 2008 song 'Joyful Noise'.

Katy's five collaborators, including producers Max Martin, who were also told to stump up $253,000, and Dr Luke's company Kasz Money Inc owed $189,000, while he was ordered to pay $61,000 personally.

However, on Thursday (10.03.22), a federal court judge ruled that the pop megastar did not plagiarise Flume's song, marking the end of years of litigation.

As reported by Billboard, the jury favoured Katy with a 3-0 vote.

A statement from the court of appeal read: “The portion of the ‘Joyful Noise’ ostinato that overlaps with the ‘Dark Horse’ ostinato consists of a manifestly conventional arrangement of musical building blocks.

“Allowing a copyright over this material would essentially amount to allowing an improper monopoly over two-note pitch sequences or even the minor scale itself.”

Judge Christina A. Snyder previously issued a ruling to reverse the jury's verdict, stating that the part of the song used as evidence was not "rare" enough to warrant copyright protection.

Synder wrote: "It is undisputed in this case, that the signature elements of the 8-note ostinato in 'Joyful Noise' ... is not a particularly unique or rare combination.

"A relatively common 8-note combination of unprotected elements that happens to be played in a timbre common to a particular genre of music cannot be so original as to warrant copyright protection."

Lawyers for Flame - whose real name is Marcus Gray - had sought nearly $20 million for him and his two co-writers.

After the jury made its verdict, defence lawyers argued for an award of $360,000.

Following the $2.78 million decision, Katy's lawyer Christine Lepera said: "The writers of 'Dark Horse' consider this a travesty of justice."

She argued Flame and his collaborators were trying to claim copyright for basic elements of music.

Christine told the courtroom: "They're trying to own basic building blocks of music, the alphabet of music that should be available to everyone."

The 'Teenage Dream' singer and the team behind the song - which had six co-writers in total - testified that they had never heard of 'Joyful Noise' before.

It was also noted that Katy started her career in church and playing gospel music.

During the trial, the song was meant to be played to the court but the speakers failed, and Katy lightened the tone when she offered to perform the song.

'Dark Horse' was released on Katy's album 'Prism'.