American Singer-songwriter Katy Perry (born Katheryn Elizabeth Hudson) performs at O2 Arena, London, England, UK. Picture: Bang Showbiz

Katy Perry, her record label and her collaborators have been ordered to pay R40.7 million after a jury ruled her hit "Dark Horse" copied Flame's Christian rap song "Joyful Noise".

The 34-year-old singer has been ordered to fork out R8 million and her label Capitol Records owe nearly R19 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 will also have to pay out, including producers Max Martin, who has to stump up R3.7 million, and Dr Luke's company Kasz Money Inc owes R2.7 million, while he is ordered to pay R893 655 personally. 

Lawyers for Flame - whose real name is Marcus Gray - had sought nearly R293 million for him and his two co-writers, but were "quite pleased" with the outcome. 

Flame's lawyer Michael A Kahn said in a statement: "Our clients filed this lawsuit five years ago seeking justice and fair compensation for the unauthorised taking of their valuable creation. 

"It has been a long and arduous path to this day, but they are quite pleased to have received the justice they sought."

After the jury made its verdict earlier this week, defence lawyers argued for an award of R5.7 million. 

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

She had 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 - testified that they had never heard of 'Joyful Noise' before.

It was also noted that Katy - who is engaged to actor Orlando Bloom - 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 2013 album 'Prism'.