A jury has found that Katy Perry, her collaborators and her record label must pay $2.78 million because the pop star’s 2013 hit “Dark Horse” copied a Christian rap song.

The jury awarded the money Thursday to Marcus Gray and his two co-writers on the 2009 song “Joyful Noise.”

Perry herself was hit for just over $550,000, with Capitol Records responsible for the vast majority of the money.

It was an underdog victory for Gray, a relatively obscure artist once known as Flame. His 5-year-old lawsuit survived constant court challenges and a trial against top-flight attorneys for Perry and the five other music-industry heavyweights who wrote the song.

Gray’s attorneys have emphasized the tens of millions brought in by the song the album it’s on. Perry’s attorneys have emphasized the tens of millions in expenses used to make and market it.

The same jurors found on Monday that Perry and her five co-writers copied Gray’s 2009 song “Joyful Noise” with 2013’s “Dark Horse.”