BISMARCK - The state of North Dakota will pay $245,000 in attorney’s fees after losing a challenge to an abortion law passed by the Legislature in 2013.

The money will go to the New York-based Center for Reproductive Rights, which provides legal representation to the Red River Women’s Clinic, North Dakota’s only abortion provider.

The payment was outlined in a settlement signed Tuesday by attorneys for the clinic and state. A judge still must approve the agreement in U.S. District Court.

“We think that it’s a fair settlement,” said Janet Crepps, the center’s senior counsel.

The “heartbeat bill” banned abortions when a fetal heartbeat can be detected, at about six weeks of pregnancy. After the challenge by the clinic, a federal judge in Bismarck blocked its implementation. The U.S. Supreme Court in January refused to review the state’s case, so it remains blocked.

Attorney General Wayne Stenehjem said Tuesday night that the center had originally sought about $338,000 in legal fees, and the state negotiated it down to $245,000 after reviewing fees in similar cases.

“It cost actually in total far less than what we thought and far less than was predicted by some,” he said.

The attorney general’s office said in January it had spent more than $320,000 on abortion-related litigation since February 2012, including about $240,000 defending the fetal heartbeat law in federal court. State lawmakers appropriated $400,000 in both 2013 and 2015 for abortion-related litigation.

Crepps said it appeared lawmakers knew the law would likely never take effect “and decided to go ahead and pass a law that was unconstitutional anyway.”

“Ultimately, we’re glad for the result that women in North Dakota had their constitutional right and health protected,” she said, “but it does seem like this was the result that was expected from the beginning.”

listen live watch live