HARRISBURG - After protracted debate, the House and Senate appeared on the brink of agreement late yesterday on a bill that would greatly expand the public's access to government documents and shed Pennsylvania's distinction as having one of the worst open-records laws in the nation.

The bill, approved unanimously by the House last night, could be voted on by the Senate as early as today. Senate Majority Leader Dominic Pileggi (R., Delaware) said he supported the bill and would ask the Senate to approve it.

"This is a happy day for Pennsylvania," said Rep. John Maher (R., Allegheny). "The long, long road toward expanding open records is about to be a journey completed."

Added House Majority Leader Bill DeWeese (D., Greene): "I think our commonwealth will go to the forefront of the 50 states for a very aggressive . . . open records law."

The bill approved last night would replace Pennsylvania's restrictive right-to-know law with one stating that all records would be considered public unless specifically exempted. It would also shift the burden onto a government agency to prove why a record should be shielded from public view.

In addition, the legislation would create an Office of Open Records with an independent director and staff, to be housed in the Department of Community and Economic Development.

And for the first time, the legislature would be subject to the open-records law. The House and Senate have historically been excluded from open-records laws, making it difficult to access even basic information, such as payroll.

Still, groups that have pushed for a new open-records bill stopped short last night of claiming victory because of a last-minute exemption that House members added. That exemption would exclude from public view records involving people under 17. It was not clear whether that exclusion would apply to police records.

"We have to look at it real carefully," said Deborah Musselman, director of government affairs for the Pennsylvania Newspaper Association, which has supported the legislation.

The law would not take effect until Jan. 1. The bill's supporters said they needed that time to allow agencies and the legislature to implement the rules and hire additional staff. The law would be retroactive and cover records already collected by government agencies.

The open-records bill, which had been stalled for months because of disagreements between the chambers, has been a key issue in the Capitol, where lawmakers have tried to make it the cornerstone of a government-reform agenda.

Journalists, community groups and other members of the public have long complained that they have had to jump through hurdles - often to be blocked - to see information that in most states is considered public.

The bill does restrict access to some information. Exemptions would include some 911 emergency recordings, medical records, Social Security numbers, and constituent letters to lawmakers.

Barry Kauffman, executive director of Common Cause of Pennsylvania, said the bill still had serious flaws.

Among them, he said, is that the legislature would not fall under the jurisdiction of the Office of Open Records. Instead, the House and Senate would get to decide for themselves whether they were in compliance with the law.