UBS AG was sued by the conservator for Fannie Mae and Freddie Mac , which accused the Swiss bank of misleading the housing agencies into buying risky mortgage debt, resulting in more than $900 million of losses.

The lawsuit by the Federal Housing Finance Agency is the latest effort by Washington to prop up the government-sponsored enterprises (GSEs), whose September 2008 federal seizure has so far cost taxpayers more than $135 billion.

UBS spokesman Peter McKillop had no immediate comment.

Other banks including Bank of America Corp and its Countrywide unit have faced lawsuits by investors who claim to have lost money in mortgage-backed debt.

According to the FHFA complaint filed in Manhattan federal court on Wednesday, Fannie Mae and Freddie Mac lost more than 20 percent of their more than $4.5 billion investment in residential mortgage-backed securities sold by UBS in 16 securitizations between September 2005 and August 2007.

The complaint said UBS hid or misstated the quality of the underlying loans and underwriting, and the ability of borrowers to make payments.

Many of the loans were issued by lenders that later failed or went bankrupt, including American Home Mortgage Investment Corp, IndyMac Bancorp Inc and New Century Financial Corp.

According to the complaint, a review of 966 randomly chosen loans from two triple-A rated securitizations in 2006 and 2007 found that 78 percent were not underwritten properly.

By May 2011, the complaint said, these securitizations were rated CCC by Standard & Poor's and Ca by Moody's Investors Service, among the lowest junk grades.

Fannie Mae and Freddie Mac did not know of the untruths and omissions, the complaint said. If the GSEs would have known of those untruths and omissions, they would not have purchased the GSE certificates.

The lawsuit seeks to recoup Fannie Mae's and Freddie Mac's losses and undo the purchases, among other remedies.

Republican lawmakers in Washington, D.C. have been trying to reduce taxpayer support for Fannie Mae and Freddie Mac, and attract more private capital to the $10.6 trillion residential mortgage market. The Treasury Department pledged in December 2009 to provide unlimited aid to the GSEs through 2012.

The case is Federal Housing Finance Agency v. UBS Americas Inc et al, U.S. District Court, Southern District of New York, No. 11-05201.

(Reporting by Jonathan Stempel; Editing by Derek Caney and Richard Chang)