LOS ANGELES (CBSLA) –  A jury Monday ruled that parts of Katy Perry’s 2013 hit “Dark Horse” were lifted from a song written by Christian rapper Marcus Gray, who is known as Flame.

The federal trial will now move to a damages phase to determine how much money may be owed to Gray. The damages phase begins Tuesday morning.

READ MORE: Double Jeopardy Claim Leads To Indefinite Hold On Retrial In Michael Avenatti Case

Gray had claimed that Perry improperly copied portions of his 2009 song “Joyful Noise” for her song “Dark Horse” which appeared on her album “Prism.”

Recording artists Katy Perry (R) and Juicy J accept the Best Female Video award for ‘Dark Horse’ onstage during the 2014 MTV Video Music Awards at The Forum on August 24, 2014, in Inglewood. (Getty Images)

In closing arguments, Perry’s attorney said the electronic beat in question is so “commonplace” that it cannot be copyrighted.

But the jury found that Gray’s attorneys had proven 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.”

“Joyful Noise” has about 3.6 million views on YouTube to date, while “Dark Horse” has 2.6 billion views.

READ MORE: IATSE Hollywood Workers Inch Closer To Strike, United Auto Workers Walk Out

The federal trial got underway July 18, with Perry herself testifying. Deliberations began Friday.

The litigation was first brought in 2014 by Gray against Perry and her other writers and producers.

The 34-year-old Perry took the witness stand July 18 and told the nine-member jury that “Dark Horse” was an entirely original work. Perry 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.

The nine-member jury heard from musicologists from both sides, who parsed a contentious 16-second instrumental phrase. Perry’s experts argued there is no similarity in the songs beyond generic elements, but Gray alleges the beat was unique and had been lifted from his “Joyful Noise” song.

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.”

MORE NEWS: 2 Men Arrested In 2019 Murder Of Jeffrey Cheng; Body Found In Trunk Of Car Parked In Stanton

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. City News Service contributed to this report.)