ALBANY — Strong advocates of improving public information laws find themselves at odds over a bill that could strengthen the Freedom of Information Law, which allows citizens and news organizations to extract public records from government.

A bill that was derailed in the final hectic hours of the legislation session aimed to compel judges to award attorney fees in most cases when government denies public records to individuals and news organizations. The proposal replaces the current provision that allows judges to consider awarding attorney fees when government wrongly denies public records.

Although the last-minute negotiations failed to gain approval Friday, the advocates said they intend to continue to work with legislators for a bill that could be acted on in the 2017 session, beginning in January.

The bill’s sponsor, Assemb. Amy Paulin (D-Scarsdale), said the measure attempts to avoid another veto by Gov. Andrew M. Cuomo, as he did last year when she tried to compel judges to award attorney fees when government loses a FOIL fight.

“We believe that in light of the veto from last year, that this language is as good as we can get, trying to accommodate the veto message as best we can,” Paulin said Friday. “We’re just trying to improve FOIL.”

The proposal includes a threshold that would trigger the order to make a government pay attorney fees and could allow government to avoid paying the fees in some circumstances. That’s where the bill by Paulin, seen by many as a champion of strong FOIL bills, is being attacked.

“The groups that signed onto the memo of opposition here were very reluctant to issue the memo because we appreciate that Assemb. Paulin is trying to do something to make FOIL better,” said John Kaehny of Reinvent NY, a good-government opposing the bill along with the New York Civil Liberties Union, the New York Public Interest Research Group and the Common Cause.

“But we are firmly convinced this opens up a gigantic new loophole that authorities will exploit,” he said in an interview Friday.

The bill would strike out current, simple language that says a judge can award attorneys “when the agency had no reasonable basis for denying access or … failed to respond to a request or appeal” within the deadlines in the law.

The bill would instead allow a judge to avoid ordering the payment of attorneys if he or she finds an agency was “substantially justified or that special circumstances make such assessment unjust.”

The bill, however, also requires that an agency be able to prove to the judge “substantive evidence of inability to comply” to avoid paying lawyer fees.

Paulin, backed by Robert Freeman of the state Committee on Open Government, said the leeway is needed to get a bill that would pass and get signed into law by Cuomo which would finally compel judges to award attorney fees, rather than just make it an option.

“A court now has full discretionary authority to award attorney’s fees,” Freeman said Friday. “That discretion would clearly diminish under the legislation.

Under current law, awarding attorney fees “never happens because judges just don’t want to award fees based on you asking,” said Diane Kennedy, president of New York News Publishers Association. She said the provisions are intended to make sure a small local government facing a massive FOIL request from a company automatically be hit with a bill for hundreds of thousands of dollars in lawyer fees if a deadline is missed

At issue is an important provision in the state Freedom of Information Law because many citizens, advocacy groups, political campaigns, businesses and news organization abandon fights for public records because of the cost of lawsuits. The measure would also compel judges to award lawyers’ fees if the agency endlessly delays complying with FOIL.