NEW YORK, June 30 (Reuters) - Pennsylvania lawmakers passed a $31.6 billion spending plan on time on Thursday, a dramatic turnaround from the political gridlock last year that left schools starved for funding during a nine-month budget stalemate.

But the plan is only half the budget battle because lawmakers must still agree on how to raise the revenue for the $1.6 billion, or 5 percent, of increased spending over the current budget.

In Pennsylvania, the tax code is contained in separate legislation. The bill will become law in 10 days unless Governor Tom Wolf signs or vetoes it before then.

The blueprint, which increases basic education funding by $200 million, came in just before the deadline for the start of fiscal 2017 on Friday.

Last year at this time the Republican-led legislature was in a bitter stalemate with Wolf, a Democrat, in part over his proposed tax hikes, including a new tax on natural gas extraction. Republicans in the House and Senate later disagreed over budget details, extending the crisis.

The impasse lasted nine months and halted the flow of funds to school districts, which collectively had to borrow at least $1 billion to survive until money started flowing again.

Some House members on Thursday cautioned against approving spending without also finalizing the source of additional revenues, with Representative Daryl Metcalfe calling the bill a “spendaholic” budget.

But others said the plan was a positive step forward and that there was still time to enact the tax code.

“We don’t have to do it this very second,” said Representative Mark Cohen. (Reporting by Hilary Russ; Editing by Cynthia Osterman)