DES MOINES, Iowa (AP) — The state of Iowa has agreed to settle a lawsuit filed by two women once held at a state-run juvenile home for nearly $700,000.

The Iowa State Appeal Board has agreed to the settlement which pays Laera Reed and Paige Ray-Cluney more than $170,000 each and their lawyers more than $340,000.

The women were held at the Iowa Juvenile Home at Toledo until former Gov. Terry Branstad ordered it closed in 2014 after allegation surfaced that some girls were held in seclusion cells.

Iowa then sent Reed and Ray-Cluney to the Copper Lake School for Girls in Wisconsin where they claim in court documents they were held in isolation cells and subjected to other treatment that led to suicide attempts.

Iowa taxpayers will pay the settlement from the state’s general fund.

Wisconsin officials in June agreed to pay $1.95 million apiece to Reed and Ray-Cluney to settle a lawsuit filed against the state for their treatment at the Copper Lake facility.