The NSA and FBI are major contributors to EPIC — the Electronic Privacy Information Center. But their “donations” aren’t exactly voluntary.

A hefty chunk of EPIC’s legal budget is taken from the pockets of the very agencies it sues, each time a federal judge agrees that the government was wrong to keep the information secret.

In the last 15 years, the Electronic Privacy Information Center (EPIC) has netted more than $150,000 from government agencies in attorneys’ fees and litigation costs from its Freedom of Information Act cases.

It’s a testament to how desperate the government is to withhold information from the American public. It’s also a revenue stream.

Some members of Congress are concerned about all the money the government is spending this way. Sens. Chuck Grassley, R-Iowa, and Patrick Leahy, D-Vt. sent a letter to the head of the Government Accountability Office in May demanding an independent inquiry into the amount of money the government spends litigating FOIA cases. “Withholding information from the public unless sued undermines the very spirit of FOIA and wastes significant taxpayer money in the process,” they wrote.

When agencies deny FOIA requests, the only way to hold them accountable is to spend countless hours and dollars on fighting them in court — an option that an average American doesn’t have. That’s where transparency and civil liberties advocates like EPIC come in.

Just this April, the National Security Agency paid EPIC $31,000 at the end of a legal battle that lasted over five years. EPIC sued the NSA when it refused to release a secret Bush-era directive establishing cybersecurity policy — a document that the NSA eventually voluntarily disclosed.

In Freedom of Information Act cases, the government may be forced to pay attorney’s fees in cases where the plaintiff “substantially prevails” on its arguments that disclosure of information is legally mandated and in the public interest.

But even in victory, EPIC’s counsels are weary from litigation — and would prefer the government didn’t waste its time and money fighting the law.

“The government’s failure to meet the transparency requirements of the Freedom of Information Act, the failure to follow the law, imposes significant costs on both FOIA requestors and on the public,” says EPIC legal counsel Alan Butler.

The NSA case is just one example. EPIC won $29,635 from the FBI this year from a case where it forced the Bureau to release 4,000 pages of information about Stingray devices that mimic cellphone towers in order to locate and intercept cell phone communications in specific geographical areas. In another FOIA case against the FBI, EPIC secured over $19,000 forcing the release of details on the agency’s facial recognition database. “There can be little dispute that the general public has a genuine, tangible interest in a system designed to store and manage significant quantities of its own biometric data,” ruled District Judge Tanya Chutkan in 2014.

Jeramie Scott, EPIC’s national security counsel, says there was a lot of “quibbling” over the fees owed to EPIC, though the FBI ended up paying more than twice what he ultimately expected.

EPIC has also secured victories against the Department of Homeland Security in a case about body scanner devices and social media monitoring, a state police department coordinating with the FBI to limit information disclosure, and several other agencies.

And EPIC is hardly the only organization suing the federal government for its lack of transparency, and then getting paid back for it.

Seth Rosenfeld, a journalist who battled with the FBI over his FOIA requests for over 25 years, secured almost half a million dollars in two cases resulting in the release of 30,000 documents. Roger Hall, a military researcher, won $414,478 from the Central Intelligence Agency after a decade-long battle for the release of documents on Vietnam War POWs.

The American Civil Liberties Union was paid $1.65 million in attorney’s fees midway through its epic case against the Department of Defense for refusing to disclose information and photos of soldiers torturing inmates from the Abu Ghraib prison, part of which is still pending, according to ACLU attorney Alex Abdo.

“If we win,”Abdo tells The Intercept, “that number will go up substantially.”