Gov. Charlie Baker issued an eleventh hour public appeal Wednesday, urging House and Senate Democrats to agree on a major spending bill.

With less than five hours until the comptroller plans to unilaterally close the books on the fiscal year that ended in June unless the Legislature can pass the long-stalled supplemental budget bill, Baker urged lawmakers to compromise to avoid a clean sweep of the $1 billion surplus into a reserve account.

The governor noted that he and the Legislature, "spearheaded by leadership in both chambers," have passed significant legislation in the last five years "by compromising and cooperating."

"The Baker-Polito Administration is hoping compromise and cooperation can be achieved again on a supplemental budget package, which must pass today if we are to deliver much needed funds to the MBTA, school safety initiatives and clean drinking water programs," Baker said in a statement released at about 10:30 a.m. "I know my colleagues in the Legislature share my sense of urgency to deliver these funds today and we stand ready to assist lawmakers in whatever way possible to enact this critical spending bill."

If there is no agreement by 3 p.m., Comptroller Andrew Maylor is poised to transfer all of the fiscal 2019 surplus into the state's rainy day fund, leaving some accounts in deficits and sweeping money earmarked by lawmakers for specific purposes into the reserve account.

Maylor "did the right thing" by putting the Legislature and administration on notice last month that their inaction would result in him unilaterally closing the books and depositing all surplus funds into the rainy day account, the governor said in November.

"It's important for him to close the books on a relatively timely basis for the rating agencies, for the bondholders who hold bonds associated with the commonwealth of Mass. and any of our other independent agencies that have bonds in the market, and he has to issue a CAFR, Comprehensive Annual Financial Report, early next year," he said.