State Assembly Speaker Vincent Prieto (left) and state Senate President Stephen Sweeney (right) listen to Gov. Chris Christie deliver his state budget speech in February.

New Jersey's leaders have only five days left to finalize a state budget for the fiscal year that begins July 1 — the final budget of Gov. Chris Christie's tenure.

But things haven't been going well lately.

The Republican governor and Democrats who control the state Legislature have been discussing a complex three-way deal in negotiations over the $35.5 billion budget. But as last week came to an end, the sides were stuck in a dramatic stalemate.

And if they don't reach an agreement soon, all of this could lead to the first state government shutdown since 2006 — and only the second in Garden State history.

Here's what you need to know about the scenario as lawmakers return to the Statehouse in Trenton for budget hearings:

CHRISTIEFAIRNESS0728

Photo by Steve Hockstein | NJ Advance Media for NJ.com

Christie holds a town hall in Fair Lawn last year.

THE BACKSTORY

Technically, it all started with education funding. For months, Christie, state Senate President Stephen Sweeney (D-Gloucester), and state Assembly Speaker Vincent Prieto (D-Hudson) differed in their plans to revamp the state's school funding formula.

But last week, Sweeney and Prieto agreed on a deal that would add $125 million to education in the budget — $100 million in new K-12 funding and $25 million to expand pre-kindergarten. It would also reallocate $46 million in existing school funding to some of the state's neediest districts.

The proposal is far from the formula overhaul that Christie called for earlier in the year. But Sweeney has threatened to hold up the budget if Christie didn't agree to some of the school funding changes — a move that could trigger a government shutdown.

In recent days, Christie has promised to support the Democrats' school plan, but in exchange for the passage of two bills. One would use state lottery revenue to help shore up New Jersey's beleaguered public-worker pension system. The other would extract $300 million from the reserve fund from the state's largest health insurance company, Horizon Blue Cross Blue Shield of New Jersey, to pay for drug addiction treatment — the focus of Christie's final year as governor.

All of this is presented with the backdrop that Christie has only six months left in office, while all 120 seats in the Legislature are up for grabs in November's election.