The U.S. Federal Housing Finance Agency brought the case against UBS in 2011, saying the bank made misleading statements and didn't conduct full due diligence when it sold $4.5 billion in these securities to the government-backed mortgage financiers.
The settlement relates to assets sold by UBS between 2004 to 2007, as the U.S. housing bubble was growing. When it burst, Fannie Mae and Freddie Mac had to be rescued by the U.S. government in 2008 as they discovered they held billions of dollars in non-performing assets that were backed by bad residential mortgages.
The settlement announced Monday still needs approval by both sides before it is finalized.
UBS said it had already made financial provisions for the case.
This UBS deal with the Federal Housing Finance Agency is the latest in a string of legal settlements. In late 2012, the bank announced $1.5 billion in penalties after admitting to fraud in its role in the Libor scandal.
In 2009, the bank paid $780 million after admitting to helping U.S. taxpayers hide money from the IRS.
The Swiss bank also announced Monday that it expected to report second quarter pre-tax operating profit of roughly 1 billion Swiss francs ($1.1 billion) at the end of the month. Net profit would be about 690 million Swiss francs.
The bank, which is set to report full quarterly results on July 30, detailed how its wealth management division was seeing billions in inflows and was boosting its cash cushion to protect it from future financial shocks.
However, the firm's global asset management division is showing some weakness, reporting two billion Swiss francs in net outflows.
Shares in the bank jumped roughly 5% in premarket trading after the numbers were released.