NEW YORK (TheStreet) -- Fannie Mae (FNMA) and Freddie Mac (FMCC) shares rallied Wednesday after a judge rejected the government's attempt to delay a widely followed lawsuit brought by Fairholme Capital Management.

Fairholme is suing the government, arguing it unfairly changed the rules after it took control of both government sponsored enterprises during the 2008 financial crisis so that the government received all of the profits and left none for private shareholders. More than 20 lawsuits in all have been filed against the government by various Fannie and Freddie shareholders, including giant hedge funds such as Perry Capital and Pershing Square Capital Management.

Judge Margaret Sweeney of the U.S. Court of Federal Claims said Wednesday she would deny a government request for a postponement, known as a "stay," thereby allowing the lawsuit to proceed. The government wanted a delay to prevent Fairholme from obtaining classified government documents and testimony that could be damaging to the government's case.

"The judge indicated that she was going to deny the stay request and that she would issue a ruling shortly, but she hasn't issued the opinion yet," said David Thompson, managing partner with Cooper & Kirk, who is representing Fairholme.

Fannie Mae shares were up roughly 6% to $2.27, while Freddie Mac shares were up about 1.9% to $2.15. Volumes were nearly three times their daily average. Preferred shares, which have been favored by many institutional investors including Fairholme, were up by a larger amount. The most widely-traded Fannie Mae preferred issue, the "S" series, was up nearly 9%.

A Treasury spokesman declined comment.