By KIM CHANDLER

MONTGOMERY, Ala. (AP) — A federal judge on Friday ordered Alabama to pay $675,964 to lawyers for abortion clinics who challenged the state's attempt to ban the most common second trimester abortion procedure.

U.S. District Judge Myron Thompson handed down the order after striking down the 2016 law. Alabama is responsible for the plaintiffs' legal fees after the law was ruled unconstitutional.

The 2016 Alabama law sought to ban the abortion procedure known as dilation and evacuation abortion. Two Alabama abortion clinics and the American Civil Liberties Union filed a lawsuit challenging the ban. The lawsuit also successfully challenged a law that attempted to ban abortion clinics near schools.

Thompson ruled the restriction unconstitutional, saying it would amount to a virtual ban on abortion in the state after 15 weeks of pregnancy. The U.S. Supreme Court in June refused to hear the state's appeal.

"There is a financial consequence to the state Legislature's continued passage of unconstitutional abortion restrictions," Randall Marshall, executive director of the American Civil Liberties Union of Alabama, wrote in an email.

The case is separate from an ongoing lawsuit over a 2019 Alabama law that attempts to ban abortion entirely.

Alabama lawmakers in 2019 approved a legislation to make abortion a felony in almost all cases. The law is set to take effect in November unless blocked by the courts.

Supporters of the outright abortion ban acknowledge it is unconstitutional under Roe v. Wade, the landmark U.S. Supreme Court decision that legalized abortion nationwide. However, they said they hope to spark a legal challenge that might lead the Supreme Court to revisit legalized abortion and overturn Roe v. Wade.