The U.S. Consumer Financial Protection Bureau and the Justice Department said on Tuesday they had reached agreement with Toyota Motor Credit Corp. for it to pay up to $21.9 million in restitution to thousands of African-American and Asian and Pacific Islander borrowers who paid higher interest rates than white borrowers for their auto loans, without regard to their creditworthiness.

Toyota Motor Credit will also change its pricing and compensation system to substantially reduce dealer discretion and accompanying financial incentives to mark up interest rates, the CFPB and Justice Department said in a statement.

The settlement provides $19.9 million in compensation for borrowers who took out loans between January 2011 and January 2016 and paid higher markup based on the alleged discrimination, the statement said. Additionally, Toyota will pay up to $2 million to African-American, Asian and Pacific Islander borrowers with markup disparities while Toyota is preparing to implement the new policies. The new policies must be in place by August 2016, the Justice Department said.

“Toyota’s reforms will level the playing field to ensure that all eligible borrowers -- regardless of their race or national origin -- can sign auto loans with fair terms and reasonable interest rates,” said Principal Deputy Assistant Attorney General Vanita Gupta, head of the Civil Rights Division.

Earlier, Toyota Motor Corp., the No. 3 carmaker in the U.S. market, reported its sales were down 4.7 percent during January.