For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

State legislators from Georgia to North Dakota have been trying to one-up each other in passing increasingly draconian abortion legislation, all under the guise of seeking to overturn Roe v. Wade. None of these laws is likely to survive legal challenges, let alone reverse the Supreme Court precedent establishing the right to an abortion. But they are serving another purpose: bankrolling Planned Parenthood’s legal campaigns.

Since 2011, federal judges have ordered at least nine states to pay a total of more than $9 million to Planned Parenthood, abortion clinics, and their lawyers to cover the legal bills when they win lawsuits against the state over unconstitutional abortion restrictions. That money has allowed Planned Parenthood to fund additional lawsuits to ensure that new unconstitutional laws don’t take effect.

Congress recognized in the 1970s that civil rights laws wouldn’t mean much if no one could afford to enforce them in court. That’s why today, most federal civil rights laws allow people to recoup their legal fees from the opposing party when they win cases defending constitutional rights. As most of the state legislators know when they pass draconian abortion restriction measures like the one that became law in Alabama last week, these laws are patently unconstitutional. When reproductive rights lawyers sue over them, they almost always win, and the state ends up footing the bill for the lawsuit.

Here are some examples:

Alabama: In 2016, the state paid $1.7 million to the ACLU after the civil liberties group successfully represented the state’s abortion clinics in blocking a law that would have banned a common second-trimester abortion procedure.

Wisconsin: In 2016, a federal judge ordered the state to pay $1.6 million to Planned Parenthood and a state abortion provider to reimburse them for legal fees incurred in their successful challenge to a law that would have required abortion doctors to have admitting privileges to a local hospital.

Missouri: In 2017, the 8th Circuit Court of Appeals ordered the state to reimburse Planned Parenthood more than $150,000 in fees after the state unsuccessfully tried to yank the license of its clinic in Columbia.

North Carolina: In 2016, the state had to dip into its emergency funds to pay Planned Parenthood and the ACLU $1 million in fees stemming from a fight over a 2011 state law that would have required women seeking an abortion to sit through a narrated ultrasound at least four hours before the procedure.

North Dakota: Taxpayers forked out $245,000 in legal fees in 2016 to the Center for Reproductive Rights after a judge ruled that the state’s six-week abortion ban was unconstitutional.

Mississippi: This February, a federal judge awarded the state’s only abortion clinic $714,000 in legal fees rung up in the fight over the state’s admitting privileges law, which the court found unconstitutional.

Kentucky: In September, a federal judge struck down a law that would have closed the state’s only abortion clinic. The judge also ordered the state to pay Planned Parenthood $21,000 after no one from Gov. Matt Bevin’s office showed up for a required deposition. A federal judge is currently considering whether to order Kentucky to pay Planned Parenthood $1 million for legal fees and costs in that case, as well as more than $500,000 to the state’s only abortion provider.

Indiana: The ACLU has sued the state four times between 2011 and 2017 over abortion laws and won every time, requiring the state to pay the civil liberties group a total of $2.8 million.

Arizona: This state has lost multiple cases to Planned Parenthood since 2012 and has paid out at least $1.3 million to the abortion provider for legal fees.

Some additional big awards are in the pipeline. In Louisiana, lawyers for abortion clinics there have asked for $4.7 million to cover expenses they’ve incurred challenging an admitting-privileges law almost identical to one in Texas, which the Supreme Court struck down in 2016. In the Texas case, lawyers for the abortion providers have asked for $4.5 million in fees, but the judge has yet to rule.

At least one frustrated federal judge has protested that conservative legislators are wasting public money in passing blatantly unconstitutional abortion laws, including laws similar to ones previously struck down elsewhere. District Judge Carlton Reeves, in the Southern District of Mississippi, wrote in an order blocking a 15-week abortion ban in Mississippi, “[T]he State is aware that this type of litigation costs the taxpayers a tremendous amount of money.” He noted the $1.2 million fee requested from Mississippi’s only abortion clinic in an earlier case the state lost as a good example.

Republican lawmakers have long fought to deny funding to Planned Parenthood, arguing that any money that goes to the reproductive health center really goes to abortion. Judging from their track record, if they truly wanted to keep public money out of the hands of abortion providers, they might want to stop passing unconstitutional abortion laws.