BISMARCK, N.D. — As North Dakota’s ban on gay marriage awaits an almost inevitable legal challenge, leaders in the conservative state must decide whether to spend some of its vast oil riches on a court fight – a step they already took to defend another divisive social policy.

Six same-sex couples sued South Dakota this week over that state’s ban, leaving North Dakota as the only state not currently facing a lawsuit against its prohibition on gay weddings. Advocates for overturning the ban say it’s a question of when, not if, one is filed.

And, considering the riches of the state’s oil boom, North Dakota could be ready for the battle.

Tom Freier, a former state legislator and the executive director of the North Dakota Family Alliance, which campaigned to bring the same-sex marriage issue to the ballot in 2004, told The Associated Press he is “very comfortable that our attorney general would appeal that.”

A spokeswoman said North Dakota Attorney General Wayne Stenehjem wasn’t available for comment Friday.

Last year at Stenehjem’s request, North Dakota lawmakers allocated $400,000 to launch what could be a lengthy court battle over the state’s new anti-abortion laws, including one that bans abortions when a fetal heartbeat is detected – as early as six weeks into a pregnancy.

Records show that the state has spent $234,597 defending new abortion laws, including $154,749 on the fetal heartbeat measure.

“In general, I think our state has shown really a strong preference for where we are on some of these cultural issues. The issues of life, the issues of marriage …,” Freier said.

More than 7 out of 10 North Dakota voters backed a constitutional amendment in 2004 banning same-sex weddings. Now every other state with such a ban has been sued- the latest, neighboring South Dakota on Thursday.

But some officials say the opposition to same-sex marriage in North Dakota isn’t as strong as it used to be.

Karyn Hippen, the mayor of Thompson, a town of fewer than 1,000 residents, became the first North Dakota mayor to join a national coalition of municipal leaders who support same-sex weddings. Hippen said although a large majority of voters favored the constitutional ban, she believes attitudes have changed.

“I think at the heart of North Dakota, there’s more of a general consensus of equality and fairness,” Hippen said.

Even if North Dakota doesn’t get into a legal battle over gay marriage, the state’s ban could be affected by the South Dakota lawsuit.

Dale Carpenter, a constitutional law professor at the University of Minnesota Law School, said Friday a broad ruling by the 8th Circuit Court on a South Dakota case could overturn North Dakota’s law. He also said the issue of gay marriage is very likely to be taken up by the U.S. Supreme Court, making a lawsuit in North Dakota more of a symbolic gesture.

“It’s almost a formality to file a lawsuit against North Dakota at this point,” he said.

Mara Morken Fogarty, a Minnesota resident who works on a board that provides resources to LGBT people in an area that includes Fargo, North Dakota, said it’s a step worth taking.

“What seemed doubtful just a few weeks ago seems possible now,” said Morken Fogarty, who married her partner in August when same-sex marriage became legal in Minnesota.

© 2014, Associated Press, All Rights Reserved.

This material may not be published, broadcast, rewritten, or redistributed.