Christian rapper FLAME has won a five-year legal battle with pop superstar Katy Perry when a California jury ruled yesterday that Perry and her team plagiarized one of the rapper's songs.

Marcus Gray, aka FLAME, alleged that his 2007 song 'Joyful Noise' was copied by Katy Perry and her team in her 2013 hit 'Dark Horse.'

According to Billboard, a jury found Perry liable for copying the underlying beat of FLAME's song. Also found liable were collaborators Lukasz Gottwald (Dr. Luke), Karl Martin Sandberg (Max Martin), Henry Walter (Cirkut), songwriter Sarah Hudson and Jordan Michael Houston (Juicy J), as well as Capitol Records, Warner Bros. Music Corporation, Kobalt Publishing and Kasz Money Inc.

The trial lasted seven days and a jury of six women and three men ruled in favour of FLAME.

'Dark Horse' hit No. 1 on the Billboard Hot 100 in 2014. Perry's defence team argued that 'Joyful Noise' was an unknown song to mainstream artists, and one of Perry's co-writers testified he never heard that song before. 

Gray and his co-plaintiffs brought in musicologist Todd Decker, "who independently determined that Perry and her co-defendants had 'borrowed' the beat from 'Joyful Noise,'" Billboard says.

The trial was split into two parts, and the judgment finished the liability portion of the trial. It will now proceed to the damages portion of the Trial today.