WASHINGTON (Reuters) - The U.S. Supreme Court on Tuesday declined to revive litigation in which shareholders accused the federal government of overstepping its authority when it restructured mortgage finance firms Fannie Mae and Freddie Mac following the 2008 housing crisis.

FILE PHOTO: A stands outside Fannie Mae headquarters in Washington February 21, 2014. REUTERS/Kevin Lamarque

The justices left in place a lower court’s 2017 ruling that the investors, led by hedge fund Perry Capital, could not pursue legal claims accusing the government of unlawfully channeling profits from Fannie Mae and Freddie Mac to the U.S. Treasury Department.

The government seized so-called government-sponsored enterprises Fannie Mae and Freddie Mac at the height of the financial crisis as they teetered on the brink of insolvency. The government took a majority stake in each.

The Treasury Department ended up pumping $187.5 billion into the companies. They have since returned to profitability. In court papers, Perry Capital said the Treasury Department has now received back its entire investment plus an additional $88 billion.

The U.S. Court of Appeals for the District of Columbia Circuit ruled last year that a lower court had correctly barred claims that the government overstepped its authority in 2012 by eliminating dividend payouts to various shareholders and requiring the companies to pay the U.S. Treasury an amount equal to their quarterly net worth.

That court said Fannie Mae and Freddie Mac investors could still pursue some damages claims, including for breach of contract.

Perry Capital, which in 2016 announced plans to shut down, was among those that sought to challenge the lower court’s dismissal of lawsuits, arguing the government’s confiscation of profits was illegal.

Other shareholders that sued included Fairholme Funds Incand individual investors. Another hedge fund, Pershing Square Capital Management LP, the biggest common shareholder in both companies, filed a brief asking the justices to take the case.

The appeals court said the government had the authority under a 2008 law that laid the groundwork for its seizure of the two companies.

Both companies are now under the conservatorship of the Federal Housing Finance Agency. Treasury Secretary Steven Mnuchin had said before taking office last year that the companies should be returned to private control but has since said that they should not be privatized.