The Texas church that and changed several lines to include references to Jesus and Christianity has apologized to "Hamilton" creator and the team behind the musical for its staging.

The Door, a church in McAllen, confirmed that its production was unauthorized and "infringed on the rights and copyrights of many" in a shared to the church's . The Door also said it would "destroy any and all video or sound recordings and images" of the unauthorized performances and rehearsals.

"The Door Christian Fellowship McAllen Church did not ask for, or receive, a license from the producers or creators of 'Hamilton' to produce, stage, replicate or alter any part of 'Hamilton'; nor did we seek prior permission to alter Lin-Manuel Miranda's work by changing the music, the lyrics, deleting songs, and adding dialogue," the church said in its statement.

The statement comes weeks after the official "Hamilton" team sent the church a cease-and-desist letter, which allowed the church to continue with its planned second performance but requested that the show not be livestreamed, recorded or shared on social media. "Hamilton" isn't available for licensing to theatre companies, though professional, authorized productions still run on Broadway and tour the country.

Per copyright law, churches are allowed to perform copyrighted music during religious services, but that exemption does not allow for streaming or distribution of those performances and does not extend to any other public performances outside of a religious service.

"I recognize as the Pastor of the church that I have an obligation and responsibility to follow the law and educate our community about these protocols," the unsigned letter read. The church's website identifies its senior pastor as Roman Gutierrez.

The Door will never again stage its version of "Hamilton" again and will ask its members to erase all media from the production. It will also pay damages, according to its statement.

"Hamilton," for its part, will donate all damages paid by The Door to the South Texas Equality Project, a coalition of organizations that support LGBTQ2S+ Texans in the Rio Grande Valley, where McAllen is located, "Hamilton" spokesperson Shane Marshall Brown told CNN on Wednesday.

The Door did not immediately respond to CNN's request for comment.

'HAMILTON' OFFICIALS SAY THEY DIDN'T KNOW THE DOOR CHANGED LYRICS

When the team allowed The Door to continue with its second performance, it was not aware of "the extensive changes to the show or that there would be a sermon at the end," "Hamilton" spokesperson Brown said earlier this month.

The Door's production of "Hamilton" included multiple references to Jesus, according to from the first livestreamed performance that was preserved online and shared by writer and atheist advocate Hemant Mehta.

In one clip, a character appears to read from the Bible while Alexander Hamilton is in crisis. The character tells him that "God is the only one that can help you right now."

In another clip, an actor playing Eliza Schuyler sings, "My hope is in Jesus. If you could just give him a chance today, that would be enough."

Other footage shared by Mehta reportedly shows The Door pastor Victor Lopez addressing the audience onstage with the "Hamilton" set behind him. In the clip, Lopez says: "Maybe you struggle with alcohol, with drugs, homosexuality. Maybe you struggle with other things in life, your finances, whatever, relationships -- God can help you tonight."

"Hamilton" creator Miranda is a staunch supporter of the LGBTQ2S+ community, famously delivering a sonnet in his in support of victims killed in the shooting at Pulse, a gay nightclub in Orlando.

"The 'Hamilton' family stands for tolerance, compassion, inclusivity and certainly LGBTQ+ rights," Brown said in a statement to CNN earlier this month, adding that the production would determine further action based on the changes to the script.

Earlier this month, Miranda thanked the Dramatists Guild, a professional trade association for theatre writers that condemned The Door's production, and fans who brought the musical to the attention of the "Hamilton" team.

"Grateful to all of you who reached out about this illegal, unauthorized production. Now lawyers do their work," he . "And always grateful to the @dramatistsguild, who have the backs of writers everywhere, be it your first play or your fiftieth."