TRENTON -- Gov. Chris Christie announced he is ending the three-day state government shutdown that drew outrage for shuttering government offices, courts, parks and beaches, while earning him unwanted attention for lounging on the very shoreline he ordered closed.

"Operations will go back to normal on Wednesday morning, with the opening of state business," Christie said late Monday.

State-run recreation sites will reopen on the Fourth of July, and the full restoration of government operations Wednesday will return about 30,000 furloughed state employees to work. Christie had ordered the second shutdown in state history after the state Legislature failed to deliver him a state budget by the July 1 deadline.

Visitors to the Garden State's 40 state parks were turned away or forced to decamp. Disappointed would-be drivers were delayed from applying for permits and licenses. And tens of thousands of public workers were pulled off the job.

Christie blamed the state Assembly leader for the budget impasse. But images of Christie and his family sunbathing outside the governor's mansion on Island Beach State Park, a stretch of coastline temporarily closed to the public, came to embody the shutdown and drew national attention to a political fight that aggrieved millions here but likely inconvenienced far fewer.

Christie signed the $34.7 billion budget sent to him by the Legislature after midnight, and the governor kept his promise to leave be hundreds of millions of dollars in Democratic add-ons.

He'd offered to blunt his veto pen in exchange for two bills the Legislature also delivered: one pledging the state lottery as an asset to the public pension fund and another giving the state more control over the state's largest health insurer, Horizon Blue Cross Blue Shield of New Jersey. That proposal deeply divided Democratic lawmakers, threw Trenton into chaos for two weeks and held up adoption of the budget.

Lawmakers said mid-afternoon Monday that they were reworking the Senate version of the Horizon bill to win over Assembly Speaker Vincent Prieto, who had refused to allow it to be put to a vote in the lower chamber.

Prieto and the state Senate health committee chairman tasked with tinkering with the bill emerged from a flurry of private meetings with state Senate President Stephen Sweeney and Horizon CEO Bob Marino to say they were on a path to compromise.

Within hours they had a new bill and a deal.

Here are details of the Horizon deal that ended shutdown

Legislative leaders ordered lawmakers to return to the Statehouse, and they voted after midnight on the Horizon bill and the overdue budget, which Christie promptly signed after making what he called "minor changes" to budget language.

"I'm saddened it's three days late, but I'll sign the budget tonight," the Republican governor said.

In the Assembly, the vote on the $34.7 billion Democrat-backed budget had been open since Friday evening. Democrats in the lower house held back their support until Prieto allowed the Horizon matter, which he warned would raise participants' premiums, to move forward.

The Senate had already approved its own version of the Horizon bill. But Sweeney would not allow a vote on the budget unless the Assembly signed onto the insurance proposal.

To pass a budget without the otherwise unrelated Horizon legislation would jeopardize about $350 million in spending Democrats added to Christie's proposed budget for schools and other safety net programs. It reached a pitch Friday when the calendar flipped to July 1 and there was no appropriations bill adopted as constitutionally required in order for the state to pay its bills.

Christie, as a result, shuttered all but such essential state services as New Jersey State Police and those that hold big dollars for the state, like the state lottery.

Saturday and Sunday, closures were limited to Motor Vehicle Commission offices and those state parks and beaches. On Monday, New Jerseyans confronted a new round of closures.

"I took off work for this," said Dani Mature, a 22-year-old from New Milford who had hoped to take her permit test Monday morning in Lodi. "I studied all weekend."

Kathleena Johnson, 47, of Teaneck, said it was "absolutely incredulous" when she was unable to file a civil suit in Bergen County.

The $34.7 billion budget contributes $2.5 billion for government worker pensions, including $1 billion from lottery ticket proceeds.

Democrats added $100 million for K-12 education, $25 million to expand preschool and $25 million for extraordinary education.

Importantly, it also redistributes $31 million in aid from districts with slumping enrollment and considered overfunded based on the school funding formula to growing districts considered underfunded.

NJ Advance Media staff writers Cindy Capitani, David J. Del Grande, Luke Nozicka, and Avalon Zappo contributed to this report.

Samantha Marcus may be reached at smarcus@njadvancemedia.com. Follow her on Twitter @samanthamarcus. Find NJ.com Politics on Facebook.