A Washington D.C. circuit court of appeals has upheld a decision that barred hedge funds from suing the U.S. government for seizing profits made by mortgage companies Freddie Mac (FMCC) and Fannie Mae (FNMA) after the post-crisis bailout. Investors in the embattled firms had argued the government illegally seized profits made by the companies after a court ruling in 2012 that permitted the U.S. government to collect up to $187 billion — the amount the government spent bailing out the two companies. (See also: Fannie Mae Dives Into Single-Family Rental Market

Shares in both Freddie Mac and Fannie Mae fell by more than 20 percent after the ruling and have continued to slide. At 1:30 p.m. eastern, both were down over 30 percent. 

On Friday, news of government involvement continued when Fannie Mae announced it would pay $5.5 billion to the government in dividends after it reported annual net income of $12.3 billion for the year ending December 2016. 

Prominent shareholders in Freddie and Fannie —Perry Capital, Bill Ackman's Pershing Square Capital Management, and Hank Paulson — were poised to obtain significant profits after the Trump administration announced it would recapitalize all losses made on the two lenders before sending them back to the private market. Investors had already seen shares in both Freddie and Fannie double since the election result. (See also: John Paulson Could Be One of the Biggest Winners of the Election.)

The case finished 2-1 and was heard by a three judge panel, two nominated by Republicans and one by Democrats. Investors can still pursue breach of contract claims, the appeals court said on Tuesday.

There is a path that could take the case to the U.S. Supreme Court.