After a weeklong trial, a California jury has concluded that Katy Perry's "Dark Horse" is a copyright infringement.

The lawsuit was brought by Christian rapper Marcus Gray, professionally known as Flame, who asserted that Perry's 2013 hit tread on his own work titled "Joyful Noise." In particular, the plaintiff alleged that the Dr. Luke-produced song took his underlying beat.

At trial, both Perry and Luke insisted they had never heard of "Joyful Noise," while Gray pointed to his song's success in a niche market. He offered the theory that the defendants may have heard it at the Grammy Awards or seen it on YouTube or MySpace, where the song was played millions of times. The defendants also attempted to knock the plaintiff's ownership of infringing material by pointing to how the beat was allegedly preexisting material. Finally, Perry and Luke called experts to the witness stand in an effort to show a lack of any substantial similarity of protected expression.

The trial had unexpected moments, from Perry offering to perform her hit live amid difficulties with the courtroom sound system, to a shooting that took place just outside the courthouse on the day Dr. Luke testified.

Most copyright cases either settle or are dismissed before ever getting to trial, but "Dark Horse" joined "Blurred Lines" and "Stairway to Heaven" as songcraft that's been put to a jury this decade. Jurors began deliberating after closing arguments Thursday, and returned their decision Monday afternoon.

The verdict means the case will proceed to a damages phase, which will begin Tuesday. Still pending is a motion from Perry's lawyers on Thursday asking U.S. District Judge Christina Snyder to rule that no reasonable jury could find copyright infringement based on the evidence presented at trial.

Compare the songs, below, for yourself.