The Door Christian Fellowship McAllen church in Texas has apologised for rewriting some of the songs from musical Hamilton to include Christian themes.
Earlier this month, the church came under fire after videos of the performance were posted on Twitter. The church put together a two-hour performance of the musical which was then followed by a sermon on God's role in helping people struggling with homosexuality.
The church had not asked legal permission to stage the "Christian version". Subsequently, lawyers for Hamilton launched a legal case against the church.
Now the church has apologised and agreed to pay damages to Hamilton's creators.
In an Instagram post, Pastor Roman Gutierrez personally apologised to creator Lin-Manuel Miranda and producers of the show.
They said: "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."
"We acknowledge there are lawful avenues to obtain a license to stage properties which we did not pursue. And it is never permissible to alter an artistic work such as Hamilton without legal permission."
Pastor Roman went on to recognise that he, as the leader of the church, has "an obligation and responsibility to follow the law and educate our community about these protocols" and said the leadership team will take the situation as "a learning opportunity about protected artistic works and intellectual property".
A spokesperson for Hamilton told the New York Times it will donate all damages to local LGBT rights organisation.