ST. PAUL, Minn. (WCCO) — The Minnesota House and Senate Tuesday night and into early Wednesday morning approved a bill funding the state’s prisons, courts and law enforcement agencies with some police accountability measures, though it fell short of what some DFL lawmakers and community activists were pushing for.

The proposal, the most contested area of the $52 billion budget, now goes to Gov. Tim Walz’s desk for signature and paves the way for the legislature to avert a partial government shutdown Thursday.

READ MORE: SportsLine Week 8 NFC East Picks: 'Everybody Is Piling On The Cowboys, And You Can't Blame Them,' Says Larry Hartstein

The bill passed the House late Tuesday night, letting go of some police reforms, and the Senate followed suit early Wednesday morning. Many DFL lawmakers said the final deal is weak on ways to hold police accountable, but still praised other parts of the bill, which include plugging a loophole in Minnesota’s sexual misconduct statute, regulating no-knock warrants, and allowing sign and release warrants for certain low-level offenses, a last-minute change by the House.

“The public safety and judiciary finance bill we passed tonight helps victims and survivors of sexual assault receive justice, and includes needed reforms to address racial disparities in the criminal justice system,” said House Speaker Melissa Hortman, DFL-Brooklyn Bark. “It doesn’t include some of the important police reform and accountability measures pushed by the House, but this is a step forward in delivering true public safety and justice for all Minnesotans despite divided government.”

Republican priorities that made it into the bill include tougher penalties for assault against a police officers and making it a misdemeanor to publish a law enforcement officer’s home address online.

There’s also funding for body cameras and expansions of violent crime enforcement teams.

The final deal came just in time for the legislative deadline after drawn-out negotiations, which Senate Majority Leader Paul Gazelka, R-East Gull Lake, said were among the most difficult he’s ever encountered in the state legislature due to the passion on both sides of the issue.

READ MORE: St. Paul Man Acquitted Of Shooting At MPD Officers During Unrest Files Civil Lawsuit

“The Senate stood firm in its position that we would listen to all sides, but would not take any provision that was going to make it harder for public safety officials to do their job,” Gazelka said. “In the end, we have a quality bill that puts the safety of Minnesotans first, welcomed reforms that had broad support, and increased resources and training for public safety officials.”

The People of Color and Indigenous Caucus within the House DFL said Monday that they would propose amendments, adding some of their top priorities back into the bill after they were axed by leadership in the final deal, including requiring the release of body camera video to families of people killed by police within 48 hours and limiting law enforcement stops for minor traffic violations.

Ultimately, they dropped those demands in pursuit of a deal—the only way lawmakers could fund the state’s prisons, court system and law enforcement agencies in time.

DFL lawmakers, though, vowed to continue their push for police accountability bills into next year and praised Gov. Tim Walz’s executive actions on the issue that make some changes, like requiring state law enforcement agencies to release body camera video within five days and directing the Peace Officer Standards and Training Board to review its data and publish a public dashboard.

He’s also flagging $15 million in federal funds for community violence intervention programs.

MORE NEWS: Neo-Nazi Group Member Patrik Mathews Sentenced To 9 Years In Prison

Caroline Cummings