LOS ANGELES — A Christian rapper was awarded $2.7 million in damages Thursday by a Los Angeles federal court jury that determined Katy Perry's hit "Dark Horse" included a beat lifted from the hip-hop artist's song titled "Joyful Noise."

Capitol Records was ordered to pay the largest chunk -- $1.2 million -- of the damages, but Perry was ordered by the jury to pay $550,200 to Marcus Gray, the Christian rapper known as Flame. The balance of the damages must be paid by Perry's six "Dark Horse" collaborators and the two corporate entities that worked the project alongside Capitol.

The federal jury in downtown Los Angeles ruled that 22.5% of the total profits earned by "Dark Horse" can be attributed to the musical passage stolen from "Joyful Noise."

Christine Lepera, an attorney for the Perry team, promised to appeal the verdict if the judge rejects a pending defense motion to dismiss the case.

"The writers of `Dark Horse' consider this a travesty of justice," Lepera said outside court, alleging that the plaintiffs hadn't proved there was "substantial similarity" between the two songs or that the Perry collaborators had ever heard `Joyful Noise" before working on the Perry hit.

Perry was not in the downtown Los Angeles courtroom when the verdict was read.

Earlier, Gray's attorney had urged jurors to award nearly half of the song's $41 million in profits to the creators of the Christian pop song that was the source of the lifted part. The defense argued that the panel should award only about $360,000 to "Joyful Noise" creator Gray and co-writers Chike Ojukwu and Emanuel Lambert.

In the end, the nine-member panel found that $2.7 million was an adequate penalty for the copyright infringement. Individually, the panel found Perry's co-writer, singer/songwriter Sarah Hudson, liable for $132,000; producer Max Martin liable for $253,000; producer Cirkut for $140,000; and producer Lukasz "Dr. Luke" Gottwald liable for $60,000.

"These defendants made millions and millions of dollars from their infringement of the plaintiffs' song," Gray's attorney, Michael Kahn, said in his closing argument in the damages phase of the trial.

Kahn contended that the beat from his client's rap song was among the primary reasons for the sales of "Dark Horse." The song was issued as a single and was included on Perry's "Prism" album and concert DVD.

In his unsuccessful attempt to keep the damages award on the low end, defense attorney Aaron Wais argued in his closing summation that Universal's marketing muscle, Perry's celebrity and performance were the driving factors in the 2013 hit song's success -- not the "Joyful Noise" beat. Testimony showed that "Dark Horse" was streamed more than a billion times and raked in over $9 million in digital sales alone.

"The reason people buy a Katy Perry song or album is because it's Katy Perry," Wais told the jury.

The attorney argued that Gray's contention that the infringing beat appeared in 45% of the "Dark Horse" track -- and so was worth 45% of its profits -- "is just plain wrong."

While Kahn suggested that his clients deserved about $20 million, Wais argued that if damages were, in fact, owed, Perry -- who earned $2.4 million from the song -- should be dinged $122,000, while her label should pay $31,000, and her co-defendants should be billed in amounts of no more than $56,000 each.

"We think that's more than fair," Wais said.

The jury began their deliberations just before lunchtime, returning with a verdict over four hours later.

During testimony Wednesday, the jury heard that Capitol earned more than $31 million from sales of an album, single and concert video, but a label vice president countered that overhead and various expenses cut the company's profits to about $630,000.

Steve Drellishak, a vice president of finance at Universal Music Group, testified that the company's costs in marketing the Perry hit included distribution, manufacturing, royalties, licensing and various supplemental costs, which offset profits by tens of millions of dollars.

In addition, Drellishak listed costs involved in maintaining Perry's "brand" during the "Dark Horse" marketing period -- over $13,000 for a wardrobe stylist, $73,000 for a charter flight, $3,000 for a hair stylist, $800 manicures and $6,000 on limousines for an appearance at the Video Music Awards.

"She always has to be in the most fashionable clothes, the most fashionable makeup," the executive said, adding that Perry is "constantly changing her image."

The civil jury determined Monday that an ostinato -- a short, constantly repeated rhythmic pattern -- in Perry's "Dark Horse" and "Joyful Noise" were identical, leading to the verdict of liability.

Gray's attorneys argued that Perry's team had ample opportunity to hear "Joyful Noise," which was released in 2009, before starting work four years later on Perry's "Dark Horse"

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

Perry took the witness stand July 18 and testified that "Dark Horse" was an entirely original work. The 34-year-old singer told the jury that the song was created after her collaborators presented a series of short instrumental passages, hoping to ignite some inspiration.

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 and which she performed in a truncated version at the 2015 Super Bowl.