In August 1989, Congress enacted the Financial Institution Reform, Recovery, and Enforcement Act. This legislation furnished funds to redeem insured deposits at failed Savings and Loan institutions (S&Ls) and  created the Resolution Trust Corporation, an agency responsibly for liquidating the assets of failed savings and loans. The bailout was expected to cost the federal government $160 billion over a 10-year period and maybe as much as $500 billion over 40 years.
Between 1988 and 1991, over 1,000 S&Ls failed, putting out of business approximately one-third of all the  S&Ls in the United States. The Federal Savings and Loan Insurance Corporation (FSLIC), the agency  responsible for insuring deposits at S&Ls, ran out of money to redeem insured deposits at these institutions. In effect, the S&L collapse bankrupted the FSLIC.
During the 1970s, a period of rising inflation in the United States, S&Ls faced strict legal limits on the interest rates that depositors could earn on S&L deposits. S&Ls paid low interest rates on deposits and made relatively low interest loans on home mortgages.
During the 1980s, the United States economy made the transition from an inflation economy to a disinflation economy, and the S&L industry also changed from a highly regulated industry to a deregulated industry. The deregulation of the S&Ls lifted the interest rate ceilings of S&L deposits, and allowed S&Ls to enter the business of consumer and commercial loans. Interest rates escalated rapidly in the early 1980s under the pressure of a tight, anti-inflation, monetary policy, squeezing S&Ls that held low interest mortgages while paying high interest rates on current deposits. 
Savings and loans tried to save themselves by turning to riskier consumer and commercial loans that paid higher interest rates. When depression struck in the oil and real estate industry in the last half of the 1980s, S&Ls began to fail rapidly.
The S&L collapse in the United States uncovered an unsuspected weakness in deposit insurance: fully insured depositors had no incentive to favor S&Ls with conservative investment policies over S&Ls with risky investment portfolios. That is, depositors had no incentive to keep track of investment practices of individual S&Ls, allowing them free rein to finance risky business ventures.
In addition to the the Financial Institution Reform, Recovery, and Enforcement Act, Congress later enacted the Federal Deposit Insurance Corporation Improvement Act of 1991. The first act placed responsibility for insuring S&L deposits with the Federal Deposit Insurance Corporation (FDIC), the agency that before had only insured commercial bank deposits. The second act provided that the FDIC vary the insurance premiums paid by financial institutions according to the riskiness of their loan portfolios. Financial institutions carrying high-risk loan portfolios pay higher deposit insurance premiums. In 2005 Congress enacted the Federal Deposit Insurance Reform Act of 2005. This act tightened the linkage between insurance premiums and the riskiness of the institution. 
See also: Depository Institution Deregulation and Monetary Control Act of 1980, Glass–Steagall Banking Act of 1933, Troubled Asset Relief Program
Barth, James R. 1991. The Great Savings and Loan Debacle.
Long, Robert Emmet, ed. 1993. Banking Scandals: The S&Ls and BCCI.
United States Government Accountability Office. “Deposit Insurance: Assessment of Regulators’ Use of Prompt Corrective Action Provisions and FDIC’s New Deposit Insurance System.” GAO=07-242, A Report to Congress, February 2007.