The pop star and her producers stole a key 16-second musical riff from the rap song "Joyful Noise," a jury found.

Neilson Barnard / Getty Images

Katy Perry's hit "Dark Horse" improperly copied a portion of a Christian rap song from 2009, a jury decided Monday, setting the stage for the pop star to potentially face a hefty penalty. Perry was not in the Los Angeles courtroom when the verdict was read after two days of deliberation. Marcus Gray and two coauthors filed the copyright infringement lawsuit five years ago, alleging that Perry and her producers stole a key 16-second musical riff from their rap song "Joyful Noise." For reference, refresh your memory with the background beat and tune for Perry's "Dark Horse":

Now, compare that to the background beat in "Joyful Noise," which Gray released under the stage name Flame.

"Dark Horse," a single from Perry's 2013 album Prism, spent four weeks at No. 1 and was nominated for a Grammy. Perry's attorneys argued that the song's creators, including producer Dr. Luke, 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. "They’re trying to own basic building blocks of music, the alphabet of music that should be available to everyone," Perry’s lawyer Christine Lepera told jurors, according to the Associated Press. Lepera argued in court that Perry's song has an "unremarkable'' beat, and that it is the only element the two tracks have in common. "It is commonplace expression,'' she said.

Michael Conroy / AP Katy Perry performed "Dark Horse" during halftime of Super Bowl XLIX, 2015.