Katy Perry lost a copyright lawsuit in court on Monday (July 29) against Christian rap artist Flame (Marcus Gray), who claimed that Perry's 2013 radio smash, "Dark Horse," copied his song, "Joyful Noise."

Gray's Grammy-nominated song "Joyful Noise," which features Lecrae, was released in 2008—five years before Perry released "Dark Horse" off her album Prism.

The lawsuit began in July 2014 when Gray alleged that "Dark Horse" lifted from his own song's production, further claiming that Perry's Egyptian gods-themed music video included visuals that tarnished his reputation in the Christian music industry.

In court, Perry testified that she originally heard the beats from Dr. Luke while in Santa Barbara. Both Perry and Luke claimed that they did not hear of the song prior to the lawsuit.

Billboard reported that during Perry's testimony, while the attorney was trying to play her song, Perry joked to the courtroom, “I could perform it for you live."

Gray's lawyers asked Perry why she cut out the beginning portion of "Dark Horse" from her 2015 Super Bowl Halftime performance, which was held seven months after the lawsuit was filed. Perry explained that she was only allotted twelve minutes and wanted to perform as many of her hits as possible. She also noted that the other songs she performed during the show were also cut down and edited.

The case will now move on to the next phase where it will be decided how much Perry owes Gray in damages.

Listen to the songs side by side, below.

Katty Perry's Most Controversial Lyrics + Performances