In the lawsuit, the investors group claimed that the Treasury Department and Federal Housing Finance Agency seized nearly all profits of the bailed-out mortgage-finance companies leaving nothing for the shareholders, thus directly violating the government’s 2008 bailout agreement.

In 2012, the Treasury Department amended the bailout terms, and prior to that the requirement was in force that a private company pays quarterly dividends of 10% on the 80% stake of government, as reported by Reuters.

Gibson, Dunn & Crutcher partner and former US solicitor general, who is representing Perry Capital Theodore Olson, said, "This lawsuit seeks to uphold the rule of law."

"If the government wanted to assume the powers of receivership, it could have chosen that course. Instead it chose conservatorship, and with the ‘sweep amendment,’ it overreached."

During the financial crisis of 2008, both Fannie Mae and Freddie Mac received a bailout package of $187.5bn, and the amended agreement does not offer any mechanism to pay back to the federal government.

"Treasury’s additional profits from the third amendment are enormous," Perry Capital claimed in the court documents.

Fannie Mae and Freddie Mac paid $66.3bn in dividend to the Treasury on 30 June, and without the amendment it could have received $4.7bn only.