Dianne Hensley, a judge in Waco, Texas, is suing the state agency that gave her a public warning last month for refusing to officiate same-sex weddings while continuing to officiate heterosexual ones.

The lawsuit, filed Monday, claims the State Commission on Judicial Conduct’s warning violates Hensley’s rights under the Texas Religious Freedom Restoration Act. Hensley is represented by the First Liberty Institute, a nonprofit religious-freedom law firm.

Judge Dianne Hensley. Courtesy First Liberty

“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.

Hensley was elected as a justice of the peace in January 2015, five months before the U.S. Supreme Court legalized same-sex marriage nationwide in the landmark Obergefell v. Hodges decision. For the next year Hensley, like most public officials in McLennan County who were authorized to, did not officiate any marriages, according to the lawsuit.

But in August 2016 she began officiating weddings again, and since then she has married 328 straight couples — but not a single gay couple. The state commission warned her that her actions were in violation of the law.

In the lawsuit, Hensley’s main defense is that she “invested extensive time and resources to compile a referral list of alternative, local and low-cost wedding officiants in Waco” for same-sex couples that come to her. According to the lawsuit, this included making arrangements with a walk-in wedding chapel three blocks from Hensely’s courtroom where couples would receive a discount.

“The obvious solution is the one that she came up with, finding a way to be able to reconcile her personal faith while serving the needs of her local community,” said Jeremy Dys, special counsel for First Liberty and part of Hensley’s legal team. “No judge should have their career ruined for simply trying to obey the rules of her faith while following the rules of the law.”

Angela Hale, a spokesperson for the statewide LGBTQ advocacy group Equality Texas, said that the problem is Hensley was in direct violation of the law, and that religious protections don’t apply to discrimination by an elected official.

“I understand she's saying that she set something up, but you can't marry opposite-sex couples and not marry same-sex couples,” Hale told NBC News. “That’s not legal, and that’s what she’s been doing.”

Hensley is seeking $10,000 in damages, both for violation of her religious freedom and for discouraging her from officiating more weddings. According to The Waco Tribune, the commission’s warning has “no practical effect on her role as an officeholder,” but Dys said that Hensley wants to continue officiating heterosexual weddings exclusively without further punishment.

“If she continues this process as she would like to, she stands to face even stiffer penalties to the point of being removed from office or worse,” Dys said.

Hale said if Hensley doesn’t want to officiate same-sex weddings alongside heterosexual ones, she shouldn’t have taken the oath of office to serve all Texans without discrimination.

“All of us have our own religious beliefs,” Hale said. “But her elected officials' duties are to serve all Texans. And if she can't do that, perhaps she's in the wrong profession.”

Follow NBC Out on Twitter, Facebook & Instagram