HOW did America wind up in its worst financial crisis in decades? Sen. Barack Obama explained it this way last week: “When sub-prime-mortgage lending took a reckless and unsustainable turn, a patchwork of regulators systematically and deliberately eliminated the regulations protecting the American people.”

That’s exactly backward. Mortgage lending took that “reckless and unsustainable turn” because of regulation – regulation driven by liberals and progressives, not free-market “deregulators.”

Pushed hard by politicians and community activists, the regulators systematically and deliberately altered financially sound lending practices.

The mortgage market was humming along just fine when, in the late 1980s, progressives decided that it needed to be “fixed.” Their complaint: Some ethnic groups got approved for mortgages at lower rates than others.

In reality, mortgage lenders were simply being prudent – taking care to provide mortgages to those who could best afford to make the payments.

The shift began in 1989, when Congress amended the Home Mortgage Disclosure Act to force banks to collect racial data on mortgage applicants. By 1991, critics were using that data to paint lenders as racist by showing that minority applicants were approved at far lower rates. Banks were “Shamed By Publicity,” as one 1993 New York Times headline put it.

In fact, they found a racial disparity only by ignoring relevant data on applicants’ ability to make mortgage payments – such as their assets and credit history.

But the political pressure was intense – with few in politics or media eager to speak the truth. And then, in 1992, came a study from four researchers at the Boston Fed, which seemed to bear out the critics’ contentions.

That study was, in fact, based on quite flawed data – but the authors’ political, media and academic protectors stifled most serious criticism, smearing the reputation of one whistleblower and allowing the Boston authors to avoid answering serious academic challenges (mine included) to their work. Other studies with different conclusions were ignored.

The very next year, the Boston Fed announced new requirements for banks – rules that have now turned out to be monumentally catastrophic: Adopt “relaxed lending standards” or risk being labeled as racists, and face serious penalties under the federal Community Reinvestment Act.

Gone (as “arbitrary” and “outdated”) were traditional lending requirements such as requiring a down payment or limiting mortgage payments to 28 percent of income. (Of course, the loosened lending standards weren’t limited to poor and minority applicants – that would be discriminatory.)

The new standards performed as intended: Home- ownership rates, stagnant for 25 years, began a rapid 10-year ascent in 1995, with many new homeowners being lower-income and/or minority families.

The large rise in demand for houses, however, fed a run-up in prices starting in 1997 – the infamous housing bubble. And rising prices hid the great vulnerability of these loans to defaults and foreclosures, because refinancing or selling at a profit was the easy alternative.

Soon, these loans began to be sold in the secondary market. Fannie Mae and Freddie Mac were enthusiastic proponents of relaxed lending standards and purchased large swaths of these loans.

Time after time, Fannie and Freddie trumped criticism by pointing to how they were helping broaden homeownership. Because of the subject’s racial overtones, they beat back calls for reform even after financial irregularities were found.

Rating agencies such as Standard & Poor’s had no experience with such loans – and imprudently used the misleading bubble-induced performance to incorrectly judge the likely performance of financial instruments based on such loans.

In 2002, the “reformers” declared victory. In a Fannie report, four academic supporters of relaxed standards crowed how these changes were “fundamentally altering the terms upon which mortgage credit had been offered in the United States from the 1960s through the 1980s . . . These changes in lending herald what we refer to as mortgage innovation.”

Lucky us.

Now that the popped bubble has left us swimming in foreclosures, the supporters of loosened credit standards seem shy about taking credit for their “mortgage innovations.” Instead, they blame subprime lenders for becoming “predatory” – when they were simply taking the Boston Fed rules to their logical conclusion while broadening the mortgage market.

Investors holding mortgage-based assets now want out. Perhaps they deserve a $700 billion refund – since they were sold a bill of goods by “progressive” politicians, academics and government officials who, in the hope of remaking society, insisted that loans based on relaxed underwriting standards were sound.

Stan Liebowitz is the Ashbel Smith professor of economics at the Business School at the University of Texas at Dallas.