Payday lender Wonga has agreed to write off the debts of 330,000 people it admits shouldn't have gotten loans in the first place.

Britain's biggest payday lender announced the move Thursday after striking an agreement with the Financial Conduct Authority which will require significant changes in the way it does business. The customers affected are those in excess of 30 days behind in their payments and who would not have fit the company's new lending criteria.

Another 45,000 customers who are up to 29 days behind will be able to repay their debt without interest.

Archbishop of Canterbury Justin Welby, who has criticized the industry, praised the move, saying it was an effort to put right some of the things that have gone wrong in the past.