JACKSON, Miss. — Mississippi’s Democratic attorney general said Wednesday that he won’t join the Republican governor in appealing a federal judge’s ruling that blocked a state law on religious objections to gay marriage.

Attorney General Jim Hood said a continued legal fight would be “divisive and expensive” in a state that’s already struggling with a tight budget.

“Simply stated, all HB 1523 has done is tarnish Mississippi’s image while distracting us from the more pressing issues of decaying roads and bridges, underfunding of public education, the plight of the mentally ill and the need to solve our state’s financial mess,” Hood said in a statement.

Amid lobbying from Baptist and Pentecostal groups, the Republican-led Legislature passed House Bill 1523 this spring in response to last summer’s U.S. Supreme Court ruling that legalized same-sex marriage nationwide.

U.S. District Judge Carlton Reeves blocked the measure moments before it was to become law July 1. Gov. Phil Bryant last week asked Reeves to reconsider the ruling and to let the law take effect while Bryant appeals to a higher court.

The law sought to protect three beliefs: That marriage is only between a man and a woman; that sex should only take place in such a marriage; and that a person’s gender is determined at birth and cannot be altered.

It would allow clerks to cite religious objections to recuse themselves from issuing marriage licenses to same-sex couples, and would protect merchants who refuse services to lesbian, gay, bisexual or transgender people. It could affect adoptions and foster care, business practices and school bathroom policies.

Reeves found that it unconstitutionally establishes preferred beliefs and creates unequal treatment for gay people.

The attorney general’s office represented Hood and Bryant in multiple lawsuits that challenged the law. Bryant will be represented on appeal by two St. Louis-based attorneys who are not charging for their work, the governor’s spokesman Clay Chandler said Wednesday.

Hood said Mississippi has no law that would force clergy members to perform weddings for same-sex couples, and the state enacted a Religious Freedom Restoration Act in 2014 that would protect private businesspeople and others from violating their own beliefs.