The federal agency that has legal control over Fannie Mae and Freddie Mac does not have to disclose documents about the political giving of the mortgage giants, a court ruled Friday.

After the Federal Housing Finance Agency (FHFA) took conservatorship of the mortgage giants during the financial crisis, Judicial Watch filed a Freedom of Information Act (FOIA) request in 2009 to obtain records detailing Fannie and Freddie’s political contributions.

When FHFA refused to provide the records, Judicial Watch sued to try and force disclosure.

Judicial Watch contends that since Fannie and Freddie are under the legal guardianship of the FHFA, records from the formerly private mortgage lending corporations are now government documents and thus subject to FOIA requests.

But a District of Columbia court ruled Friday that because officials at FHFA signed a sworn affidavit stating they have not seen records of political contributions to Fannie and Freddie, FHFA is not required to comply with the FOIA request.

"Although we appreciate Judicial Watch’s interest in how much money Fannie and Freddie gave to which politicians in the years leading up to our current financial crisis, satisfying curiosity about the internal decisions of private companies is not the aim of FOIA, and there is no question that disclosure of the requested records would reveal nothing about decisionmaking at the FHFA," the ruling reads.

The court said the documents detailing political donations would only be subject to the FOIA law if officials at FHFA accessed them.

"Although there is no doubt that the FHFA could consult the requested records as it conducts its business, the problem for Judicial Watch is that no one from the FHFA has done so," it continues.

Fannie Mae and Freddie Mac were the two financial mortgage giants that the federal government bailed out in 2008 in response to massive losses because of the housing crisis.

In 2008, the watchdog group Open Secrets reviewed campaign filings and found that Fannie and Freddie had given a total of $4.7 million in contributions to members of Congress. Among the top 10 recipients of the donations were then-Sens. Barack Obama (D-Ill.) and Hillary Clinton (D-N.Y.).