Fannie Mae and Freddie Mac were sued by Massachusetts for failing to comply with a state law that lets nonprofit organizations buy foreclosed homes to sell them back to their former owners, Bloomberg News reported today. Massachusetts Attorney General Martha Coakley yesterday sued the two government-backed finance companies and the Federal Housing Finance Agency, the U.S. regulator that oversees them, in a bid to force them to comply with the state law, passed in August 2012. Fannie Mae and Freddie Mac require nonprofits that buy foreclosed homes and re-sell them to their former owners to pay the full amount of the mortgages or the properties' fair market value, whichever is higher, according to a complaint filed yesterday in state court in Boston. That policy runs afoul of a state law that allows a foreclosed-home purchase at the lesser price, Coakley said.