The New York state attorney general and the inspector general for the Federal Housing Finance Agency, the regulator for Fannie Mae and Freddie Mac, are cooperating to probe how banks pooled mortgages and sold them to investors before the housing bust.

The agreement with the FHFA, signed in recent weeks, is to share information, according to the office of New York Attorney General Eric Schneiderman.

“Attorney General Schneiderman continues to work with all partners who are committed to getting to the bottom of the mortgage crisis and holding those responsible accountable,” Schneiderman spokesman Danny Kanner said.

A spokewoman for FHFA Inspector General Kristine Belisle confirmed that her office is “working with the AG’s office and others.”

Schneiderman has been investigating the mortgage securitization practices of major banks, including Bank of America and JPMorgan Chase, amid allegations that banks committed fraud in underwriting mortgage debt, according to a person familiar with the investigation.

The FHFA in September sued 17 large banks and financial institutions over losses on about $200 billion of subprime bonds.