The Federal Housing Finance Agency, which oversees the two government-controlled home-loan backers, accused UBS of selling to them $4.5 billion of bundled home-loan securities during 2005-2007 that were much more risky than the bank had claimed.
The FHFA said the subsequent downgrades of the securities, as the US housing market crashed and millions of homeowners defaulted on their mortgages, caused Fannie Mae and Freddie Mac to lose "in excess of 20 percent of their entire investment."
It said many of the underlying home loans in the securities were much weaker, and at greater risk of default, than UBS claimed.
"UBS's misstatements and omissions in the registration statements regarding the true characteristics of the loans were the primary and proximate cause of Fannie Mae's and Freddie Mac's losses," the FHFA said in a US court filing in New York.
Many of the loans in the securities were actually so-called subprime, or highly risky, home loans, often with poor or fraudulent documentation, according to the filing.
"Forensic review of several hundred loan files has revealed numerous instances in which there was a failure during the underwriting process to confirm the reasonableness of the borrower's stated income or to correctly account for the borrower's debt."
The collapse in the market for bundled home loan securities is blamed for the failure of numerous financial institutions during the crisis. The government rescued both Fannie Mae and Freddie Mac from bankruptcy in September 2008 and has spent about $164 billion to keep them afloat.