The Royal Bank of Scotland says it will vigorously defend itself against US government claims it misrepresented the quality of mortgages it sold. The US Federal Housing Finance Agency (FHFA) has filed lawsuits against 17 banks, including RBS, Barclays and HSBC, over mortgage-based investments. Values plunged during the financial crisis and a bailout of mortgage firms cost US taxpayers billions of dollars. RBS says it has \"substantial\" legal and factual defences to the US claims. A spokesman said: \"We believe we have substantial and credible legal and factual defences to these claims and will defend them vigorously.\" HSBC and Barclays declined to comment to the BBC on the legal action. \'Improper actions\' Goldman Sachs, Bank of America, Deutsche Bank, Nomura, Citigroup, and Societe Generale are among the other banks facing legal action from the FHFA. BBC business correspondent Joe Lynam says it is believed the financial institutions are being sued for a sum in the tens of billions. The FHFA said in a statement that there had been \"improper actions by the firms and individuals\". \"Based on our review, FHFA alleges that the loans had different and more risky characteristics than the descriptions contained in the marketing and sales materials provided to the Enterprises for those securities,\" the statement said. The FHFA oversees mortgage giants Fannie Mae and Freddie Mac, which act as guarantor for most home loans in the US. The two firms lost more than $30bn (£18.5bn), partly because of their investments in sub-prime mortgages, and were bailed out by the US government. Since the rescues, US taxpayers have spent more than $140bn to keep the firms afloat. Alistair Heath of the financial newspaper City AM told the BBC the importance of the FHFA\'s lawsuits against the financial institutions should not be downplayed. \"Regardless of the validity or otherwise of these allegations, a lot of these big banks are likely to end up paying billions of dollars in compensation to the US government. \"So it\'ll be quite a costly settlement at best for these firms and it comes at quite a difficult time for the banking industry.\" Major banks are already negotiating with the attorneys general of all 50 states to settle mortgage abuse claims. The banks were looking for a comprehensive deal that would protect them from future litigation. But the FHFA\'s action may complicate attempts to reach a deal with the states.