Congress gave a big 50th birthday present to the nation's premier open government law.

The Freedom of Information Act, originally signed by President Lyndon Johnson on July 4, 1966, has worked as a deterrent to government secrecy by requiring agencies to hand over their records to anyone who asks for them.

Last week, Congress sent the White House a bill to revamp FOIA for the 21st century. In a bitterly divided Washington, support for the bill united Republicans such as Sen. John Cornyn of Texas and Rep. Darrell Issa of California with Democrats such as Sen. Patrick Leahy of Vermont and Rep. Elijah Cummings of Maryland.

In fact, the bill passed the Senate and House this spring unanimously, and President Obama has indicated he will sign it. But that belies the tensions that delayed these much-needed reforms for years.

The bill appeared to be on the verge of passage in December 2014, but then-House Speaker John Boehner refused to bring it up for a vote. It took an FOIA lawsuit from the Freedom of the Press Foundation to learn why: A six-page memo showed the White House worked behind the scenes to torpedo the bill, saying it would cost too much and cause more delays, among other dubious arguments.

Obama came into office with a much different message. With the public soured on the national security-flavored secrecy of the Bush years, Obama vowed to operate the most transparent administration in history. One of his first acts was to order federal agencies to presume that their records are open.

Despite that pledge, FOIA is failing. Requesters wait months and even years for agencies to hand over records, and frequently they're so redacted as to make them incomprehensible. Agencies say they're swamped by a crush of requests, yet too many of them fail to take the simple step of putting popular data online.

One young freelance journalist testified to the House Oversight Committee last year that the handling of his FOIA request was "the single most disillusioning experience of my life."

Still, FOIA remains an essential tool of democracy. Since 2003, the American Civil Liberties Union and other organizations have used a FOIA lawsuit to obtain records documenting the use of torture by intelligence agencies following 9/11.

The bill headed to Obama's desk codifies his presumption of openness into law, binding all future presidents to that pledge. More tangibly, it creates a central website for FOIA requests, meaning people who want government records don't have to approach each agency individually.

It also limits the time that agencies can hide some of their most revealing records: ones that reflect a "deliberative process," the internal debates and drafts that tell you what people were really thinking. It's recently been invoked by the government to withhold a 1981 document related to the CIA's Bay of Pigs invasion in 1961. Previously "deliberative process" could be withheld forever; the limit will be 25 years.

Records requested three times or more must be put online by the agency. And it strengthens the ability of a federal office to mediate problems between requesters and agencies.

The bill falls short of everything transparency advocates sought, including stronger language to prevent the abuse of certain FOIA exemptions. Yet it should be recognized as a substantial victory for bipartisanship, an increasingly rare phenomenon in America today.

Congress' support for openness only extends so far, however. A White House statement pointed out one glaring flaw in FOIA that remains unfixed.

It doesn't apply to Congress.

Contact James Eli Shiffer at james.shiffer@startribune.com or 612-673-4116.