The Texas attorney general is declining to defend the state agency charged with disciplining judges in a lawsuit filed by a justice of the peace who was warned over her refusal to marry same-sex couples.

Judge Dianne Hensley. Courtesy First Liberty

The justice, Dianne Hensley, sued the Commission on Judicial Misconduct last month after it issued a nonbinding warning over her yearslong refusal to marry gay couples while continuing to marry heterosexual couples.

The attorney general, Ken Paxton, a Republican, said he will not defend the commission in the lawsuit because its actions conflict with his views of the Constitution.

"We believe judges retain their right to religious liberty when they take the bench," his spokesperson, Marc Rylander, said in a statement.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

In her lawsuit, Hensley contends that the commission's actions violated her rights under the Texas Religious Freedom Restoration Act.

“By investigating and punishing Judge Hensley for acting in accordance with the commands of her Christian faith, the Commission and its members have substantially burdened the free exercise of her religion, with no compelling justification,” the lawsuit claims.

The commission's warning noted that Hensley's actions should be flagged for “casting doubt on her capacity to act impartially to persons appearing before her as a judge due to the person’s sexual orientation,” but it carried no punishment.

Jacqueline Habersham, the commission's interim executive director, did not immediately respond to an NBC News request for comment.

Since the landmark Obergefell v. Hodges decision in 2015 made same-sex marriage legal across the U.S., the general practice in Texas has been for judges to either perform all marriages or none at all. But Hensley, a Christian, argued she could continue officiating straight marriages and refer gay couples elsewhere because same-sex marriage conflicts with her personal religious beliefs.

Gerald Gafford, right, comforts his partner of 28 years, Jeff Sralla, left, as they stand before Judge Amy Clark Meachum to obtain a time waiver at the Travis County Courthouse after the U.S. Supreme Court ruled that same-sex couples have the right to marry nationwide, on June 26, 2015, in Austin, Texas. Eric Gay / AP file

The commission’s warning last month cited a 2017 interview in which Hensley told The Waco Tribune that following the Obergefell decision, she initially chose not to perform any marriages but then had a change of heart.

“My conscience was bothering me, because so many people were calling and wanting a wedding,” Hensley said, referring to heterosexuals.

She started to perform weddings again, but only of straight couples. According to the newspaper, she married roughly 70 couples from September 2015 to June 2017. She said she deserved a “religious exemption” from marrying gays as a “Bible-believing” Christian.

Hensley’s suit is seeking $10,000 in damages, both for violation of her religious freedom and for discouraging her from officiating weddings. Jeremy Dys, special counsel for the nonprofit conservative legal organization First Liberty Institute and part of Hensley’s legal team, said that Hensley wants to continue officiating heterosexual weddings exclusively without further punishment.

This is not the first time Paxton has opted not to represent a state agency. In 2018, his office did not defend the Texas Ethics Commission when his political allies sought to dismantle the agency in court, according to The Houston Chronicle.

Follow NBC Out on Twitter, Facebook & Instagram