HARRISBURG - Gov. Rendell and the politically divided Legislature finally signed off on a state budget last night, resolving a multibillion-dollar, recession-driven shortfall and ending the state's 101-day budget stalemate, the nation's longest this year.

Rendell and top legislators acknowledged that the inexcusable delays in negotiating the state's $27.8 billion spending plan would overshadow what they otherwise defended as a strong budget that protects crucial services amid the state's worst shortfall since the Great Depression.

Just before 9 p.m., Rendell signed the key pieces of the spending plan - the primary appropriations bill and a companion bill tapping more than $1.5 billion from the state's reserves - after a flurry of votes in the House and Senate. In a somber news conference, he also promised quick action to move money to school districts and social-services providers that were left to fend for themselves and their wards without the billions of dollars in state subsidies on which they normally rely.

"I believe there is no reason to celebrate the signing of the budget," Rendell told reporters. "That's not because it isn't a good budget, and it is, it's a responsible budget and it does good things for the state of Pennsylvania. But it took entirely too long. There's no excuse for us having put the people of Pennsylvania, many of whom depend desperately upon the services we provide, to put them through over three months of waiting."

Senate Majority Leader Dominic Pileggi, R-Delaware, sounded many of the same notes, but pointed to some inevitable factors, including the recession, as well as Rendell's ambitious goals and an inexperience House leadership.

"I think there's a sense of fatigue and disappointment that the process took so long," Pileggi said. "I think that overshadows the fact that the budget is one that is . . . sound, from a fiscal standpoint, and I think a well-crafted budget that positions us well for the recovery in the state's economy and the nation's economy."

Overall, the appropriations bill cuts spending by more than 1 percent, while boosting spending on operations and instruction in public schools by $300 million, or 5.7 percent, a level on which Rendell insisted. It does not raise the state tax rates on sales or income, Pennsylvania's two biggest sources of revenue.

Some strings are still hanging loose.

Negotiations on one puzzle piece of the budget - the legalization of table games at slot-machine casinos - were expected to drag into next week because of lingering disagreements between the House and Senate.

Poker, blackjack and other games are expected to produce $200 million in taxes and fees for the state treasury, forcing the holdup of $700 million in discretionary funding for universities, museums and others to ensure a balanced budget, officials said.

The money could be authorized once a table-games bill passes.

The budget relies on a blend of federal budget aid, transfers from reserve funds, spending cuts and nearly $500 million in new taxes on businesses that pay the capital stock and franchise tax, and on buyers of cigarettes and little cigars.

The plan also relies on leasing more state forest land to natural- gas-exploration companies, a provision that drew heated criticism from environmentalists.