By Karen Brooks

(Reuters) - A federal judge in Alabama has issued a permanent injunction barring state officials from denying same-sex couples the right to marry in that state, according to court documents made public on Wednesday.

The order, filed on Tuesday by U.S. District Judge Callie Granade, came in response to a 2014 lawsuit challenging Alabama's ban on same-sex marriage, finalizing a decision Granade made in early 2015 that the state law was unconstitutional.

The legality of gay marriage was at the center of a national debate until the U.S. Supreme Court ruled in June 2015 that the U.S. Constitution provided same-sex couples the right to marry.

Despite that order, Alabama officials continued to resist the change in the law.

Last month, Alabama Supreme Court Chief Justice Roy Moore was suspended for issuing an administrative order to state probate judges that they should not issue marriage licenses to same-sex couples.

In March, the Alabama Supreme Court dismissed petitions by opponents of same-sex marriage asking to reinstate the ban on those unions but refused to vacate or withdraw its own March 2015 ruling in favor of the same-sex marriage ban, made just months before the U.S. Supreme Court ruling.

"This brings a finality by permanently prohibiting Alabama from enforcing its marriage laws which are discriminating against gay couples," said Susan Watson, executive director of the ACLU of Alabama. "Given Alabama's fierce resistance, this permanent relief was required to ensure marriage equality in the state."

Officials from the office of Alabama Attorney General Luther Strange, who is named in the lawsuit, could not be reached for comment on Wednesday.

Strange's attorneys had asked for the lawsuit to be dismissed because the state was currently complying with the federal law.

But Granade said in her ruling that "promising to sin no more" did not render a permanent injunction unnecessary. The actions of the suspended chief justice and other officials suggested that other attempts may be made to undermine the constitutional right of same-sex couples to marry, she wrote.

"It cannot be said with assurance that there is no reasonable expectation that Alabama's unconstitutional marriage laws will not again be enforced," the order said.

(Reporting by Karen Brooks in Fort Worth, Texas; Editing by Peter Cooney)