UPDATE:

TRENTON -- Gov. Chris Christie at the stroke of midnight Friday ordered a state government shutdown after last-ditch efforts to reach a compromise with Democrats who control the New Jersey Legislature on funding a new state budget failed.

"This order is necessary to maintain the protection, safety and well-being of the people of New Jersey while I attempt to convince the Legislature to send me a fiscally responsible budget that I can sign and re-open New Jersey's government, " said Christie.

"This was completely avoidable. But state Assembly Speaker Vincent Prieto needlessly stalled the budget process, forcing the closure of New Jersey government and inconveniencing everyone living in and visiting our state."

The shutdown -- only the second in state history -- will close everything from state parks to motor vehicle services offices as the July 4 holiday weekend begins.

It does not affect essential services, such as the New Jersey State Police and psychiatric hospitals. The state lottery and NJ Transit will remain in operation, as well.

The governor signed the order after Prieto (D-Hudson) refused to let the lower house of the Legislature vote on a bill giving the state power to tap into the reserves of Horizon Blue Cross Blue Shield of New Jersey to fund addiction treatment.

State Senate President Stephen Sweeney (D-Gloucester) had agreed to vote on the proposal, and as of Thursday, had sufficient votes to pass the measure, which has been tethered to any agreement on the state budget.

Christie on Thursday night ordered cabinet members to review their agencies to determine what services meet the "essential service" threshold, or those that protect the health, safety and welfare of the citizens of the state.

The first shutdown, in 2006, closed everything from state parks to courts and motor vehicle offices and for the first time ever closed what were then 12 Atlantic City casinos. Casinos are no longer subject to state shutdowns.

That shutdown was fueled by a dispute over sales and property taxes between Gov. Jon Corzine and Assembly Speaker Joseph Roberts, a fellow Democrat.

Corzine ordered a shutdown of non-essential government services, followed by a second round of shutdowns three days later on July 4.

The Legislature then adopted a budget on July 8, with all government services restored by 8:30 a.m. on July 10, a Monday.

NJ Advance Media staff writer Brent Johnson contributed to this report.

Claude Brodesser-Akner may be reached at cbrodesser@njadvancemedia.com. Follow him on Twitter @ClaudeBrodesser. Find NJ.com Politics on Facebook.