TRENTON — New Jersey lawmakers reached an impasse Thursday over Gov. Christie's push to restructure the state's largest health insurer, imperiling a vote on the budget and threatening the first government shutdown in more than a decade.

Under the constitution, the Democratic-controlled Legislature and Christie, a Republican, face a deadline of 12:01 a.m. Saturday to pass a balanced budget.

Assembly Speaker Vincent Prieto (D., Hudson) held a vote on a $34.7 billion spending plan but was forced to pull the bill when it failed to win majority support. About half of the Democratic caucus refused to cast a vote on the budget, believing that Christie would veto their priorities if they did not also pass legislation that would dramatically change Horizon Blue Cross Blue Shield of New Jersey.

Christie said he made clear to Prieto and Senate President Stephen Sweeney (D., Gloucester) last week that he would approve the Democratic budget on the condition that they pass the Horizon legislation and a bill to transfer the state lottery to the pension system.

The Senate passed both pieces of legislation Thursday. Sweeney allowed senators to debate the budget but refused to hold a vote, given the deadlock in the Assembly.

Prieto agreed to the lottery proposal — though he didn't hold a vote on it Thursday — but refused to consider the Horizon one.

"If Speaker Prieto wants to close the government, this is going to be his decision," Christie said at a news conference early Thursday evening.

"I don't want to see Speaker Prieto keeping people out of Liberty State Park this weekend for Fourth of July weekend," the governor said. "I don't want to see Speaker Prieto stopping people from going to Island Beach State Park this weekend. … But this is purely up to him now."

Late Thursday, Christie directed state agencies to prepare for a shutdown and identify essential services they would maintain.

Prieto pinned the blame for a possible shutdown on lawmakers, including South Jersey Democrats, who support the budget but didn't vote for it. He accused them of "standing with Chris Christie to give him what he wants."

Prieto said he had given ground on a deal to shift school aid to underfunded districts and delivered Christie a "huge win" on the lottery transfer, which Christie says would immediately reduce the state's pension debt by $13.5 billion.

"I negotiated in good faith," Prieto said. "You have to draw the line somewhere."

Sweeney and Prieto said both houses would resume work on Friday.

The last government shutdown — the first in state history — came in 2006, when Gov. Jon S. Corzine, a Democrat, battled his own party in the Legislature over his proposal to raise the sales tax.

Thousands of state employees were furloughed. Division of Motor Vehicle offices closed, as did state parks. Lottery sales and road construction were also brought to a halt during the eight-day shutdown.

At issue now is Christie's push for the state's largest health insurer to dedicate "excess" surplus for health programs that would benefit the general public, not just the nonprofit company's policyholders. Christie in February called on Horizon  to establish a permanent fund that would provide drug addiction treatment to the poor and uninsured.

The Senate on Thursday voted by 21-15 in favor of a variation of that proposal. The bill would establish a process by which Horizon and the commissioner of the state Department of Banking and Insurance determine an "efficient" surplus range. If the surplus were to exceed that range, Horizon would have to submit a plan to the state to use the money to benefit policyholders and "improve the overall health status of all New Jersey residents."

The legislation, sponsored by Sen. Joe Vitale (D., Middlesex), would expand Horizon's obligations to include a "charitable mission," including by serving as the state's insurer of last resort. That means it would have to provide care to the uninsured. The bill would also restructure Horizon's board — giving three of the 15 seats to members selected by policyholders — and require greater financial disclosure.

Horizon, which had $2.4 billion in capital reserves at the end of 2016, says the money is needed as a cushion in case it faces unexpected expenses. It says the legislation would force it to raise premiums on its 3.8 million policyholders.

To that end, Prieto dubbed the legislation a "Christie tax," and declared he would not negotiate on the proposal as part of the budget process.

Christie also drew a line in the sand and threatened to use his line-item veto authority to gut the budget if Prieto didn't cave.

Democrats' budget priorities include $150 million in new school aid, including $50 million for expanded pre-K and extraordinary special education; $5 million in grants for new Child Advocacy Centers, which help abused children; an additional $2.2 million for domestic violence services and rape prevention services; and $8 million for prisoner reentry programs.

"Let there be no doubt that if the budget comes to me without the Vitale bill and without the lottery that I will use all the constitutional authority I have to craft the budget to be much more like the budget I submitted in February," Christie told reporters.

He said Prieto "needs to explain to his members why he's standing up for a multibillion-dollar insurance company rather than give them things they want in this budget very, very badly, and that I'm willing to give them."

Sweeney, speaking with reporters after the Senate voting session, said, "I'm not willing to put a bill on [Christie's] desk not knowing what the funding is going to be."

Prieto said Christie couldn't be trusted; even if the Legislature approved the Horizon bill, the speaker said, the governor might still veto Democrats' proposed spending, as he has in the past.

"Shame on him on whatever he takes out," Prieto said. He said he would consider a different version of the Horizon legislation after the budget is passed.

Christie's term ends in January, meaning he'll be a lame duck once he signs the budget and legislators turn their attention to campaigning. The governor's mansion and all 120 seats in the Legislature are up for election in November.

"I never pay you today for a hamburger tomorrow," Christie said. "They're never coming back. They're in an election year."

Earlier Thursday, members of an affiliate of the AFL-CIO lined the halls of the Statehouse, urging lawmakers to vote against the Blue Cross legislation, with some holding copies of a Wall Street Journal editorial titled "Christie's Insurance Shakedown." The union says its members would face layoffs if the bill were to pass.

Other interest groups across the political spectrum, as well as both parties' nominees for governor, have also declared their opposition to the legislation.

"There is as much reason to shut down the State of New Jersey over Horizon as there was to shut the George Washington Bridge for a traffic study," said Hetty Rosenstein, state director of the Communications Workers of America.

The bill's supporters say it would make the insurer more transparent to current and prospective policyholders. "This is by no means a slush fund," Vitale said Monday. "This is by no means a money grab."

Staff writer Maddie Hanna contributed to this article.