For nearly a decade, Beth Jacobson lived inside the vast machinery of subprime mortgages that shook the nation’s economy.

In sworn court testimony, she describes watching brokers comb through heavily black areas such as Baltimore and Prince George’s County, forging relationships with churches and community groups to sell them shoddy loans. She says she approved homeowners with sterling credit ratings for higher interest rates than they needed to pay. And she says she pumped out millions of dollars in mortgages to people with no paperwork and low incomes to become Wells Fargo’s top-producing loan officer.

The machine made her rich — the questions came later. Now, she has recast herself as a crusader for consumers in a battle that has pitted her against the system she once pushed.