Minnesota's divided Legislature has agreed to pump $1.2 billion more into the state's classrooms over the next four years and spend $250 million on bonuses for workers such as nurses and grocery store clerks who were on the front lines of the pandemic.

The education deal struck on Tuesday represents the single largest increase in school funding in 15 years and could stave off some teacher layoffs triggered by the pandemic.

The breakthrough on K-12 funding and the plan to help essential workers come as legislators have one week left to wrap up the next two-year state budget and avoid a government shutdown. Top lawmakers remained confident Tuesday they could sort out remaining differences before that deadline, including lingering divisions over the public safety budget.

"We're picking up steam," House Speaker Melissa Hortman, DFL-Brooklyn Park, said of negotiations with Senate Republicans. "There's certainly a lot of things on the precipice of getting done, and a lot of bills that are getting closed up."

The education bill is one of the largest pieces of the state budget. Full details were not available Tuesday, but Senate Education Committee Chairman Roger Chamberlain, R-Lino Lakes, said the deal would increase the per-pupil funding formula that supports school districts by 2.5% next year and 2% the following year, put more money toward hiring and recruiting teachers of color and Indigenous teachers and increase suicide-prevention training and grants.

"The priority was recovery, money in the classrooms, no mandates," Chamberlain said.

Democratic Senate Minority Leader Susan Kent, DFL-Woodbury, said she thinks the education spending increase will allow some districts to avoid looming staff layoffs but noted that some areas are in worse shape than others and it would not prevent all teacher cuts.

"We're pretty pleased with where this has come out in education," Kent said, calling it a "massive improvement" from what Senate Republicans had initially proposed.

A large influx of federal funding has been a key factor in helping legislators wrap up budget bills this session.

The plan to devote money to worker bonuses will likely draw on those dollars, Republican Senate Majority Leader Paul Gazelka said.

Yet to be decided is who will get some of the $250 million, and how much people will receive.

House Democrats will prioritize lower-paid workers who don't have access to paid leave, Hortman said, noting that small-business owners, grocery store workers and custodial staff were among those on the front lines during the COVID-19 pandemic. A nine-person group with three members appointed by the Senate, three by the House and three by Gov. Tim Walz will decide the parameters of the bonus program, Hortman said.

She said she wants them to make the decisions by Labor Day. "There is no shortage of heroes and it will be a difficult issue to ascertain who belongs in that pool and how much can we give them and how do we distribute the money," Hortman said.

Legislators also announced an agreement on another thorny issue Tuesday: They will extend the state's reinsurance program for a fifth year. The program helps health insurers cover people with high-cost health conditions and aims to prevent premium hikes.

There is a list of about 20 items — reinsurance, worker bonuses and K-12 funding among them — that Gazelka said he, Hortman and Walz have been helping negotiate with the chairs of various committees.

"We're not quite there yet, but I would say there was good cooperation at the end to try to just get this," Gazelka said.

Meanwhile, lawmakers continued to consider various budget bills Tuesday. The Senate passed a bill that funds agriculture programs, and another bill funding commerce, climate and energy.

Those bills now head to Walz's desk for his signature.

The Senate also approved the jobs and economic growth bill that includes $150 million for a revitalization program that will provide grants and loans to businesses hurt by COVID-19 or the civil unrest last year. The House still must vote on the measure.

Other bills were wrapping up, including a funding package for transportation and state environmental programs, but leaders said they need more time to finalize negotiations around public safety and police accountability measures.

Hortman said the public safety bill is the last one where they are still trading offers. Leaders are also negotiating behind the scenes on a potential deal to end the emergency powers Walz has used for more than a year to respond to the pandemic. That vote could be the final action of the Legislature before adjourning the special session.