BOSTON — Santander has agreed to a $26 million settlement with officials in two states over the bank’s role in issuing subprime auto loans to thousands of consumers who could not afford to repay them, officials said Wednesday.

The settlement, announced by Massachusetts Attorney General Maura Healey and Delaware Attorney General Matt Denn, calls for Boston-headquartered Santander Consumer USA to make payments to borrowers and to the states.

Santander said it did not admit wrongdoing in the agreement and had taken several steps in recent months to address the issues raised in the investigation.

The settlement was the first of its kind in the U.S., according to Healey, who compared it to abuses by subprime mortgage lenders that contributed to the financial collapse and subsequent recession nearly a decade ago.

“These predatory practices are almost identical to what we saw in the mortgage industry a few years ago,” she said.

Santander, which Healey called the largest packager of subprime auto loans in the nation, funded “unfair and unaffordable” loans to more than 2,000 consumers in Massachusetts, knowing that many of the borrowers could not meet the terms and would default, Healey said.

Buyers often agree to financing terms through contracts signed at car dealerships, but the loans are backed by financial institutions such as Santander, who often resell the loans to third parties or place them into asset pools.

The bank also was accused by the states of knowingly taking on loans from car dealers that submitted loan applications that inflated the reported incomes of customers, and continued to fund loans from dealers it knew had high rates of delinquency and default among customers.

The bank said it entered into the agreement voluntarily and was pleased to move past the investigation.