Judge tosses Mass. suit against Fannie Mae, Freddie Mac

A federal judge has dismissed a lawsuit brought by Massachusetts Attorney General Martha Coakley against the federal agencies Freddie Mac and Fannie Mae for refusing to sell homes in foreclosure to nonprofit groups that want to return them to the original owners.

US District Judge Richard G. Stearns issued his ruling in the case Tuesday.

The lawsuit made national headlines in June when it was filed. It also made a splash last week in the Massachusetts gubernatorial campaign, in which Coakley is the Democratic nominee.

The Globe reported Thursday that the cochair of Coakley’s campaign finance committee, Elyse Cherry, runs the only nonprofit in the country that buys and sells such distressed properties.