Katy Perry is getting in trouble for stealing from music made for the Lord.

A jury on Monday found that the pop idol’s 2013 hit “Dark Horse” improperly copied a 2009 Christian rap song.

Monday’s decision, setting up arguments over how much the singer and other defendants will owe, was returned by a nine-member federal jury in a Los Angeles courtroom.

It came five years after Marcus Gray and two co-authors first sued alleging “Dark Horse” stole from “Joyful Noise,” a song Gray released under the stage name Flame.

The case now goes to a penalty phase, where the jury will decide how much the plaintiffs are owed for copyright infringement.

“Dark Horse,” a hybrid of pop, trap and hip-hop sounds that was the third single of Perry’s 2013 album “Prism,” spent four weeks atop the Billboard Hot 100 in early 2014, and earned Perry a Grammy nomination.

Gray’s attorneys argued that the beat and instrumental line featured through nearly half of “Dark Horse” are substantially similar to those of “Joyful Noise.”

Perry’s attorneys argued that the song sections in question represent the kind of simple musical elements that if found to be subject to copyright would hurt music and all songwriters.

“They’re trying to own basic building blocks of music, the alphabet of music that should be available to everyone,” Perry’s lawyer Christine Lepera said during closing arguments Thursday.

KATY PERRY SAYS SHE WOULD BE OPEN TO WORKING WITH TAYLOR SWIFT ON A SONG

Perry and the song’s co-authors, including her producer Dr. Luke, testified during the seven-day trial that none of them had heard the song or heard of Gray before the lawsuit, nor did they listen to Christian music.

Gray’s attorneys had only to demonstrate, however, that “Joyful Noise” had wide dissemination and could have been heard by Perry and her co-authors, and provide as evidence that it had millions of plays on YouTube and Spotify, and that the album it’s included on was nominated for a Grammy.

“They’re trying to shove Mr. Gray into some gospel music alleyway that no one ever visits,” said plaintiffs’ attorney Michael A. Kahn during closing arguments, when he also pointed out that Perry had begun her career as a Christian artist.

Kahn and Gray declined to comment but smiled as they left the courtroom after the verdict.

The 34-year-old pop superstar and “American Idol” judge brought laughs to the proceedings when she testified during its second day, and her lawyers were having technical troubles getting “Dark Horse” to play in the courtroom.

“I could perform it live,” Perry said.

No performance was necessary after the audio issues were fixed. Jurors heard both songs played back-to-back in their entirety at the end of closing arguments this week.

CLICK HERE TO GET THE FOX NEWS APP

Perry, who was not present for the reading of the verdict Monday afternoon, recently has been facing controversy for a property battle against a group of nuns.

The artist bought a sprawling eight-acre plot of land in California that previously belonged to a convent for the nuns until the Archdiocese of Los Angeles evicted them.

The Associated Press contributed to this report.