WASHINGTON (Reuters) – U.S. and state regulators ordered Wells Fargo (WFC.N) and JPMorgan Chase (JPM.N) to collectively pay $35.7 million on Thursday to settle charges that they participated in an illegal marketing kickback scheme with a now-defunct title company.

The Consumer Financial Protection Bureau and the Maryland Attorney General’s Office ordered Wells Fargo to pay a $24 million penalty plus another $10.8 million in redress to consumers. JP Morgan will pay a $600,000 penalty, plus another $300,000 in redress, the CFPB said.

The CFPB said the former title company, Genuine Title, would give the banks’ loan officers cash, marketing materials and other consumer information in exchange for business referrals.

In addition to charging the two banks, the CFPB also announced it was charging a former Wells Fargo employee, Todd Cohen, and his wife, Elaine Oliphant Cohen, for their involvement in the alleged scheme.

Cohen and his wife are also settling, and paying a $30,000 penalty.

“These banks allowed their loan officers to focus on their own illegal financial gain rather than on treating consumers fairly. Our action today to address these practices should serve as a warning for all those in the mortgage market,” CFPB Director Richard Cordray said in a statement on Thursday.

A Wells Fargo spokesman said the bank had taken “strong corrective action” as a result of the issue. It had terminated involved staff, and said it would improve the monitoring of its processes and its team members.

JPMorgan said that “these former employees clearly violated our policies, procedures and training”.

Attorneys for Cohen and Oliphant Cohen could not be immediately reached.

The CFPB said that Genuine Title had been based in Maryland but went out of business in April 2014.

(Reporting by Sarah N. Lynch and Douwe Miedema; Editing by Sandra Maler and Andrew Hay)