Katy Perry and others on her team must pay a Christian rapper $2.78 million after a jury found that she had improperly copied a portion of his song for her own hit “Dark Horse.”

Marcus Gray and two coauthors filed the copyright infringement lawsuit five years ago, alleging Perry and her producers stole a key 16-second musical riff from their rap song “Joyful Noise,” which was released under the stage name Flame in 2009.

“Dark Horse,” a single from Perry’s 2013 album Prism, spent four weeks at No. 1 and was nominated for a Grammy.

Gray’s team had reportedly pushed the jury to award them nearly $20 million, noting “Dark Horse” had grossed about $41 million. Perry’s attorneys had argued for damages to be around $360,000.

Of the financial penalty, a jury determined that Perry is responsible for just over $550,000, with Capitol Records responsible for the majority of the tab, the Associated Press reported. It was not immediately clear how much others involved in writing the song, including producer Dr. Luke, were on the hook for.

During the trial phase, Perry’s attorneys argued that the song’s creators hadn’t heard of “Joyful Noise” and don’t listen to Christian rap. They also contended the elements of the riff are so basic that they should be available to all songwriters.

But on Monday, the nine-member jury — which also decided the financial penalty — disagreed after analyzing both tracks and hearing hours of testimony from music and sound experts.

It’s unclear how much of the penalty Perry will have to pay, given that contracts often include stipulations that indemnify the artists to some degree from financial damages.

A representative for Perry could not immediately be reached for comment.

You can listen to both songs and the 16-second background riff that was the heart of the lawsuit below: