The Senate tax bill that passed in the wee hours of Saturday morning could have massive implications for schools and universities, students and parents. Public education advocates warned that certain provisions could put pressure on state and local spending for public schools while giving parents incentives to send children to private schools.

The bill passed 51 to 49 after senators worked through the night on last-minute revisions and amendments — including some scribbled in the bill’s margins. The legislation has to be reconciled with a version passed by the House before being sent to President Trump, but many of the provisions affecting education are likely to stay.

Public education advocates hammered the bill for offering incentives to private school parents through tax-free school savings accounts while curtailing the deduction for state and local taxes that fund public schools.

“It’s crazy that we’re eliminating the ability of people to deduct their state and local taxes that go directly to local services, including schools . . . while at the same time providing a $10,000 incentive for folks to send their kids to private schools,” said Sasha Pudelski, assistant director for policy and advocacy at the American Association of School Administrators, which represents public school superintendents across the country.

Here’s a round-up of what the bill could mean for education.

1. It’s good for Hillsdale College (and others, too) Much of the high-drama wrangling over the bill centered on Hillsdale College, a tiny conservative Christian institution in Michigan whose benefactors include Education Secretary Betsy DeVos and whose graduates include her brother, Erik Prince, founder of the troubled security contractor Blackwater. Late Friday, after Sen. Pat Toomey (R-Pa.) authored an amendment that would exempt the college from a tax on endowments, Democrats slammed the GOP for protecting an institution with connections to the administration.

HAPPENING NOW: Voting on my amdt to strike the DeVos Tax Earmark – a provision that provides a tax exemption for Hillsdale College, a DeVos-funded elite private school that refuses to comply with federal non-discrimination laws. These special interest giveaways are outrageous!!!

But it turned out, the version passed by the Senate wound up sparing some other schools that feared their endowments would face a levy.

The Senate measure would impose a 1.4 percent excise tax on investment income at an estimated 25 to 30 private colleges and universities with large endowments. The House version would tax about 65 to 70 schools with endowments worth at least $250,000 per student. The Senate threshold is higher — $500,000 per student.

That change would mean about 40 schools that had thought their endowments would be taxed — including Hillsdale College — were removed from the list. The difference is one of the points that must be reconciled before a final bill clears Congress.

2. It’s good for private school parents Hours before the bill was passed, Sen. Ted Cruz (R-Tex.) introduced an amendment that would allow parents to use a special tax-free college savings account to pay tuition for private K-12 schools, a provision that would largely benefit wealthier families who can already afford private schools.

“This change will have real and significant effects. Your vote will expand options for parents and children spending their own money, and will prioritize the education of the next generation of Americans,” Cruz said Friday night on the Senate floor.

The amendment passed by a hair, facing opposition from all Democrats and from two GOP senators — Susan Collins of Maine and Lisa Murkowski of Alaska. Ultimately, Vice President Pence had to be summoned after midnight to cast a tie-breaking vote, much like he had when the Senate confirmed DeVos as education secretary.

The amendment is virtually identical to a provision in the House version. DeVos praised the House legislation: “This is a good step forward, reflecting that education should be an investment in individual students, not systems,” she said last month.

For school choice advocates, the expansion of tax-free college savings accounts is viewed as giving more parents the opportunity to send their child to private school. Parents could spend up to $10,000 a year from those accounts.

“It’s a good first step,” said Sister Dale McDonald of the National Catholic Educational Association.

Public school advocates assailed the move, saying it undermines public schools by providing financial incentives for parents to move their children into private schools.

Senate Republicans are “doing what they can to decrease the popularity and success of our public schools,” Pudelski said.

3. It’s not so good for public school budgets Like the House bill, the Senate measure curtails the federal deduction for state and local taxes. Advocates worry that states, counties and cities will have a tougher time raising money for schools — which get nearly all of of their money from state and local tax revenues — because those taxes will no longer be fully deductible.

Separately, the bill would bar school districts from using cost-effective, tax-free “advance refund bonds” to refinance school bond debt, a prohibition that could prove costly for districts looking to refinance to save money, according to John Musso, executive director of the Association of School Business Officials International.

4. It saves the school supply deductions The House bill eliminates a $250 tax deduction for teachers who spend their own money on classroom supplies, a move that enraged many teachers, who spend an average of $500 annually, according to one survey.

The Senate bill not only saves the deduction, it doubles it, to $500. It is unclear what will happen to the provision as the bills move to reconciliation.

5. It’s better for college students When it comes to student loan interest deduction and tuition waivers, the Senate tax legislation is a better deal for college students and college graduates than the House version.

The House bill would repeal the tax deduction for student loan interest, which allows people repaying student loans to cut their tax burden by as much as $2,500 annually. The House version also taxes tuition waivers — which allow many graduate students to attend school tuition-free — as income, raising the ire of students who said such a levy would make their education unaffordable.

But the Senate leaves those provisions intact. The Senate plan also excludes a House proposal to roll three higher-education tax credits into one benefit.

A previous version of this article did not fully describe how the Senate bill would change the state and local tax deduction. It will curtail it, not eliminate it. The story has been updated.