Toyota’s auto-loan division has agreed to pay $21.9 million in restitution to thousands of black, Pacific Islander, and Asian customers whom the government said were charged higher interest rates than white borrowers.

The settlement, announced Tuesday, came about because beginning in 2013 the U.S. Consumer Financial Protection Bureau and the Department of Justice had investigated the Toyota Motor Credit Corporation for unfair pricing. Federal agencies said that from 2011 up to 2016 borrowers of color regularly paid Toyota between $100 and $200 more in interest rates than a white borrower with similar credit. The discriminatory system that allowed the unfair pricing is called “dealer markup,” a little-known loan-inflation tactic that allows dealers to make more money; and in this case, at the unequal expense of minorities.

Here’s how the markup worked: Auto dealers often offer in-house financing. And when a person chooses that route, the dealer sends the buyer’s credit score and other loan risk factors to, in this case Toyota Motor Credit Corporation. The dealer learns the rates the buyer has qualified for, but then is allowed increase it, as the dealer sees fit. That inflated rate can translate into profit for the dealer. It’s usually a small amount—Toyota allowed its dealers to increase rates up to 2.5 percent. But that adds up over years of interest.