A South Dakota-based payday lender will pay Georgians $23 million in restitution and forgive all outstanding loans in the state under a lawsuit settlement Attorney General Chris Carr announced Wednesday.

Carr's predecessor, Sam Olens, sued Western Sky Financial in 2013 after the company reneged on an agreement to stop peddling its wares in Georgia.

Carr’s office announced that the lender will pay back past Georgia borrowers and forgive $17 million in existing loans. The company will also pay the state a $1 million fine and reimburse the state $500,000 for legal costs.

A Georgia Supreme Court ruling in October helped secure the settlement. The court ruled that out-of-state Internet lenders are subject to the state’s Payday Lending Act, which prohibits a lender from making loans of $3,000 or less unless the lender is licensed to lend in Georgia or under federal law.

Interest rates on those loans are capped at 10 percent. Western Sky sold more than 18,000 loans in Georgia with rates as high as 340 percent, Carr’s office said.

“This settlement sends a strong message that our office will not tolerate unscrupulous lenders who prey on consumers by charging illegal interest and fees,” Carr said in a statement.

Carr said a restitution fund will be created for affected borrowers. Those eligible will be notified with two months. More details will be posted at www.GAWesternSkySettlement.com.