Attorney General Martha Coakley is threatening to sue the Federal Housing Finance Agency for refusing to comply with a state law designed to help stem foreclosures.
Coakley said mortgage giants Fannie Mae and Freddie Mac, currently under the control of the agency, have refused to comply with a 2012 Massachusetts law that allows the sale of homes in foreclosure to nonprofit organizations whose goal is to keep homeowners in their homes.
The nonprofits typically try to buy the foreclosed home from the lender at its current market value and restructure the loan to sell it back to the former homeowner under a modified loan agreement the homeowner can afford. Those new mortgage agreements also take into account the changing value of the home.
The state law explicitly forbids banks and lenders from refusing to consider offers from legitimate buyback programs merely because the property will be resold to the former homeowner.
‘‘Our law works, and they have no good reason for not doing this,’’ Coakley said. ‘‘In fact they are a roadblock to progress here in Massachusetts. Unless they are willing to do that now, we’re going to explore what our legal options might be to try and force their compliance.’’
Coakley, a Democrat, included her concerns in a letter dated Wednesday to the FHFA’s new director, Melvin Watt.
A spokeswoman for the FHFA said it has received the letter and will respond.
The nonprofit Boston Community Capital has helped restructure about 500 mortgages, CEO Elyse Cherry said. She said the group first makes sure the homeowner is in stable fiscal shape before buying the home and structuring a fixed 30-year rate mortgage and selling it back.
She said Fannie Mae and Freddie Mac are significant lenders and their refusal to work with nonprofits seeking to keep homeowners in their homes is a problem.
Coakley said Wednesday that the program benefits homeowners and banks by giving homeowners loans they can afford. She said the depth of the foreclosure crisis and the change in the housing market requires creative solutions.