A downtown Los Angeles jury on Monday sided with a Christian rapper who claims a portion of Katy Perry's 2013 hit "Dark Horse" was lifted from his song "Joyful Noise," with the nine-member panel calling the underlying beat in the two songs substantially similar.

With the jury's finding of liability, the federal trial will now move to a damages phase to determine how much money may be owed to rapper Marcus Gray, who is known as Flame. That phase will begin Tuesday morning.

The verdict came following two days of deliberations in Los Angeles federal court. In their closing arguments, Perry's attorney said the electronic beat in question is so "commonplace" that it cannot be copyrighted.

But, according to the jury, Gray's attorney proved that the "Joyful Noise" segment was original, protected by copyright and that it was copied and used in "Dark Horse." The jury also found that the defendants -- including singer/songwriter Sarah Hudson and music producers Lukasz "Dr. Luke" Gottwald, Max Martin and Cirkut -- had the opportunity to hear "Joyful Noise" before they worked on "Dark Horse."

During the weeklong trial of the copyright-infringement case, the panel heard from Perry herself as well as musicologists from both sides who parsed the contentious 16-second instrumental phrase.

"This was a case about taking," Gray's attorney, Michael Kahn, said in his closing argument Thursday. "The defendants copied an important part of (Gray's) song."

The litigation was brought in 2014 by Gray against the Grammy- nominated singer and her collaborators. However, the creators of "Dark Horse" testified they had no knowledge of "Joyful Noise," nor had they heard of Gray or the two other plaintiffs before the suit was filed.

Defense attorney Christine Lepera told jurors that the eerie, electronic beat could not be protected by copyright because it was merely a "common building block" of music.

"It is commonplace expression," she said, adding that the Perry song's "unremarkable" beat is the only element the two tracks have in common.

"There is no reasonable basis to assume" Perry and her collaborators ever heard "Joyful Noise," Lepera said.

Unlike Perry's hit, Gray's song lacked "widespread distribution," and any contention that the Perry team had been exposed to it is "pure speculation," the defense attorney said.

Perry took the witness stand July 18 and assured the panel that "Dark Horse" was an entirely original work.

The 34-year-old singer testified that her song was developed after her collaborators presented a series of short instrumental passages, hoping to ignite some inspiration.

"If something sparked my interest, I would go, `Hmm, I have some ideas,"' Perry testified during about a half-hour on the stand.

She said that after hearing an interesting passage, she and her co- defendants began to fashion the tune that later appeared on her fourth studio album, "Prism," and which she performed in a truncated version at the 2015 Super Bowl.

After a technical glitch caused attorneys to delay playing the recording for the jury last week, the Grammy Award-nominated singer drew laughs in the courtroom by offering to perform "Dark Horse" from the witness box.

In denying Perry's motion for early judgment last summer, U.S. District Judge Christina Snyder wrote that the plaintiffs "have demonstrated a triable issue of fact as to access because `Joyful Noise' achieved critical success, including a Grammy nomination, and was readily available and viewed millions of times on YouTube and MySpace."

The judge said various issues in the case are "questions of fact to be resolved by the jury."