Katy Perry[1]'s "Dark Horse" is going to cost her a lot of green, but her record label is paying twice as much for ripping off the tune.

The federal jury in L.A. just dished out the damages, and the pop singer will have to pay $550k to Christian rapper Flame. He sued Katy, Dr. Luke[2] and 7 other songwriters on "Dark Horse" for jacking his tune, "Joyful Noise." Capitol Records was also a defendant, and the jury ordered it to pay the lion's share ... $1.2 million.

In all, Flame will get a total of $2.7 million from all the defendants. The jury said his song was responsible for 22.5 percent of the "Dark Horse" profits.

His Grammy-nominated gospel track came out in 2008 ... 6 years before KP dropped "Dark Horse."

The jury's decision on hefty damages came after hearing 2 full days of testimony about how much Perry's megahit and the album it was on, "Prism," have earned since release. Katy's cut, to date, has been $3.2 mil ... while Capitol Records earned $31 million.

Of course, the same jury returned a unanimous verdict that Perry and her co-defendants improperly copied[3] the Christian rap track -- specifically by jacking its continually repeated musical rhythm.

As we reported ... Flame's music label uploaded a "Joyful Noise" vid on YouTube in 2008, and it's racked up millions of views over the years.

In his lawsuit, first filed[4] way back in 2014, Flame claimed Perry stole the underlying beat and riff in the middle of "Joyful Noise" for "Dark Horse." He also said it destroyed

Read more from our friends at TMZ