Maryland Governor Martin O'Malley rejected calls from the Catholic Church to not sponsor a gay marriage bill.

O'Malley said he supported an effort earlier this year to legalize gay marriage in Maryland – which ended without a vote in the House after passage in the Senate – but kept a low profile in the debate.

In July, the Democratic governor announced he would sponsor a renewed effort during the upcoming legislative session, which begins in January.

His decision came on the heels of New York becoming the sixth state to legalize the institution.

Before he announced that he would take on a more visible role in the fight, the Catholic Church attempted to dissuade him.

Edwin F. O'Brien, the archbishop of Baltimore, wrote that such a move would “deeply conflict” with O'Malley's Catholic faith.

“Maryland is not New York,” O'Brien wrote in a letter to O'Malley. “We urge you not to allow your role as the leader of our state to be used in allowing the debate surrounding the definition of marriage to be determined by mere political expediency. The people of Maryland deserve no less.”

On Thursday, O'Malley responded that he was attempting to right a wrong. Both letters were made public on Monday at the request of the media.

“I do not presume, nor would I ever presume as governor, to question or infringe upon your freedom to define, to preach about and to administer the sacraments of the Roman Catholic Church,” O'Malley wrote. “But on the public issue of granting civil marital rights to same-sex couples, you and I disagree.”

“[W]hen shortcomings in our laws bring about a result that is unjust, I have a public obligation to try to change that injustice.”