WASHINGTON — Wells Fargo and JPMorgan Chase have agreed to pay more than $35 million combined to resolve claims that loan officers at the two banks received kickbacks in exchange for steering mortgage borrowers to a Maryland title company.

The Consumer Financial Protection Bureau said Thursday that JPMorgan and Wells Fargo each agreed to consent orders filed in federal court to settle the claims.

Wells Fargo has agreed to pay $24 million in civil penalties and $10.8 million to consumers affected by the scheme. JPMorgan is to pay $600,000 in penalties and about $300,000 in redress.

The CFPB and the Maryland attorney general found that loan officers at the banks referred borrowers to a now-defunct title company, Genuine Title, in exchange for cash and marketing services.

Federal law prohibits giving anything of value in exchange for a referral of business related to a real estate settlement service.

According to the CFPB, loan officers at Wells Fargo and JPMorgan sent homebuyers financing a mortgage through the banks to Genuine Title, which provided real estate closing services.

In return, the title company, which went out of business last April, provided the loan officers with cash, as well as consumer information and marketing services aimed at helping them drum up more loan business.