Fannie Mae and Freddie Mac, the mortgage finance giants that were taken over by the government this month, said Monday that they were subpoenaed for documents as part of federal grand jury investigations into their accounting.

The United States attorney’s office for the Southern District of New York subpoenaed the two companies on Friday for documents related to accounting, disclosure and corporate governance dating from Jan. 1, 2007, to the present.

The Securities and Exchange Commission is also investigating these matters and directing the companies to preserve the documents, Fannie Mae and Freddie Mac said.

Both companies said they would cooperate.

The Federal Bureau of Investigation said last week that it was expanding its inquiry of possible corporate fraud related to the mortgage market collapse to include Fannie Mae, Freddie Mac, Lehman Brothers and the giant insurer American International Group.