Three former executives at Fannie Mae lost their bid to end a Securities and Exchange Commission lawsuit alleging investor fraud.

The SEC filed suit against former CEO Daniel Mudd, former Chief Risk Officer Enrico Dallavecchia and the former chief of the single-family operation Thomas Lund for misleading investors about the entity's exposure to risky subprime mortgages. Each served at the firm between 2005 and 2009.

When Mudd took over in 2005, Fannie stock traded above $60 a share. By September 2008, when he left, the company was thrown into conservatorship and has taken more than $116 billion in bailouts since. Taxpayers are also funding attorney fees in several suits against former government-sponsored enterprise executives.

The SEC alleged in a December 2011 lawsuit these three executives excluded nearly $100 billion in loans written to borrowers with weak credit histories from their financial disclosures. The GSE also allegedly failed to count $28.5 billion in mortgages bought from the Countrywide subprime unit in 2007.

The executives claimed in the motion to dismiss that they were acting as members of an "independent establishment of the United States, or any lending agency which is wholly owned, directly or indirectly, by the United States," and were thus exempt from liability under securities law.

Judge Paul Crotty of the U.S District Court for the Southern District of New York ruled that Securities and Exchange Act language doesn't clarify whether Fannie, as a government-sponsored private corporation, fell under the exemption before conservatorship.

"The term 'independent establishment' is placed between 'executive departments' and a 'lending agency'; and the statute's title refers to the application of the Exchange Act to 'governmental departments or agencies," Crotty wrote in his ruling Friday.

He went on to show previous courts ruled that the government had limited powers over Fannie and its brother Freddie Mac. Their boards were controlled by shareholders. Previous congressional committees refer to them as "governmental instrumentalities" not agencies.

There is also the controversy over how Fannie defined subprime. Crotty said in his ruling that a form from Fannie in 2007 defined subprime as "generally loans made to a borrower with a weaker credit profile," which "often" or "typically" originate from "lenders specializing in this type of business, using process unique to subprime loans," and Fannie called a loan "subprime" if it originated from "these specialty lenders" or "subprime divisions of larger lenders."

Thus, Crotty ruled, the loans left out of the disclosures fit the definition.

As for whether the executives knowingly deceived investors, Crotty said the SEC allegations are plausible.

"Mudd and Dallavecchia spoke to investors on conference calls and repeated (Fannie's) misleading disclosures while emphasizing that (Fannie's) subprime exposure was 'immaterial,' and constituted approximately 'zero percent' of (Fannie's) book of business," Crotty wrote.