NEW YORK (Reuters) - New Jersey Governor Phil Murphy struck a last-minute budget deal on Saturday, ending threats of a government shutdown that had raged for weeks as he struggled to reach an accord with members of his own party.

FILE PHOTO: New Jersey Governor Phil Murphy speaks after taking the oath of office in Trenton, New Jersey, U.S., January 16, 2018. REUTERS/Lucas Jackson

It was the state’s first budget deal in eight years with a Democrat at the helm, instead of Republican firebrand and one-time presidential hopeful Chris Christie.

Nonetheless, Murphy spent months disagreeing with the Democrat-run legislature over which taxes to hike and by how much.

Threats of a shutdown had raged for weeks. If the state government closed, state-run beaches and parks would have shuttered just before the July 4 holiday on Wednesday.

“I believed in my core that we would eventually get here,” Murphy told a news conference. “Let me be clear, there will be no shutdown. The parks and beaches are open.”

Thousands of state workers faced furlough - as happened last year when the state government shut down for only the second time in New Jersey history.

Last July, widespread derision followed a photo of Christie and his family lounging on a beach that had otherwise been closed to the public during the shutdown, which lasted three days.

In the new budget for fiscal 2019, which began on July 1, taxes on millionaires will rise to 10.75 percent from 8.97 percent to help raise revenue for education, transportation and public pensions.

Lawmakers repeatedly approved a similar “millionaires tax” in the past - rejected by Christie - but now they worry such hikes could drive away the wealthy after federal tax law changes this year limited certain deductions.

Murphy had proposed a $37.4 billion budget that relied on $1.6 billion of tax hikes altogether.

After balking at the millionaires tax and other proposals, the legislature sent Murphy its own $36.5 billion budget on June 21.

Murphy said lawmakers relied on “short-term gimmicks” and “phantom savings” that would leave the general fund nearly $1 billion short of where it should be.

Under Saturday’s agreement there will be no change to the state’s sales tax, which was lowered in 2016 to 6.625 percent from 7 percent in exchange for higher gasoline taxes to help pay for infrastructure repairs.