Fannie Mae and Freddie Mac are publicly traded companies that guarantee the majority of new mortgages in the U.S. They are key players in the government’s foreclosure-prevention initiative.

Fannie Mae, officially the Federal National Mortgage Association, and Freddie Mac, the Federal Home Loan Mortgage Corp., were taken over by the government in 2008 after billions of dollars in losses and years of mismanagement.

Fannie and Freddie operate in the secondary mortgage market. They don’t sell mortgages directly to homeowners; they buy mortgages from banks and other lenders, which can use the money to issue new home mortgages.

To increase access to home loans, Fannie was created as a federal agency in 1938 and chartered by Congress in 1968, followed by Freddie in 1970. But they also are publicly traded corporations and — before their taxpayer bailout — had a duty to maximize shareholder return.

Unlimited Digital Access. $1 for 4 weeks.

Those divergent missions were criticized as a “fundamentally flawed” business model by the Financial Crisis Inquiry Commission, which Congress created to examine the causes of the economic crisis that began in 2007.

Fannie and Freddie loosened underwriting standards leading up to the financial crisis, buying and guaranteeing riskier loans and ramping up purchases of mortgage-backed securities to please Wall Street analysts and to “ensure generous compensation for their executives and employees,” the commission determined.

By 2007, the commission said, the companies had $5 trillion in mortgages resting on razor-thin capital.

The commission found that the companies used their political power for decades to ward off effective regulation and oversight, spending $164 million on lobbying from 1999 through 2008. It concluded, however, that although Fannie and Freddie contributed to the financial crisis, they were not the primary cause.

With the housing market in turmoil in 2007 and 2008, Fannie and Freddie reported billions of dollars in losses. They were placed in conservatorship under the Federal Housing Finance Agency (FHFA) in September 2008.

Since then, the Treasury Department has provided $169 billion to cover their losses (with repayments the net cost to taxpayers is $141 billion). The total could rise to $363 billion, the FHFA said. Other estimates put the total closer to $390 billion.

Fannie and Freddie’s future is unclear. The Obama administration and Republicans in Congress agree that Fannie and Freddie should be abolished. In February, President Obama proposed gradually phasing them out and gave Congress options for shrinking the government’s role in housing finance.