Not only have Alabama’s attempts to defund Planned Parenthood Southeast been blocked by the courts, Alabama taxpayers will also have to foot the bill in the more than $51,000 in legal fees for the reproductive health organization, the Montgomery Advertiser reported, under a settlement filed in federal court Monday morning. The agreement still must be approved by a U.S. District Judge Myron Thompson, according to the Montgomery Advertiser.

Republican Alabama Gov. Robert Bentley (pictured above) was one of a number of elected officials who sought to defund Planned Parenthood by cutting off Medicaid funding to clinics after a series of “sting” videos asserted the organization was illegally profiting off the of the sale of aborted fetal tissue. (Planned Parenthood has denied the claim that it is profiting from donation programs, and says reimbursement fees clinics receive for storage and staffing costs are legal.)

However, Thompson issued a preliminary junction last month that halted the state’s move to cancel its Planned Parenthood Medicaid contract after the Planned Parenthood Southeast sued the state over the defund attempt.

Other states have faced their own legal obstacles in attempting to defund the healthcare organization. The U.S. Department of Health and Human Services has warned states that blocking Planned Parenthood’s Medicaid funding may not be legal.

In Monday’s agreement, Planned Parenthood Southeast said it does not participate in the fetal tissue donation programs that led to the claims that clinics are harvesting tissue for profit.

“Had the governor checked beforehand, he would have known that,” ACLU attorney Randall Marshall, who represented Planned Parenthood Southeast, told the Montgomery Advertiser.