The $1.3 billion budget deficit, and urgent need to fully fund education, could have crushed worthy mental-health reforms like a ship between icebergs. But a compelling case was made that previous budget cuts were too severe, and lawmakers responded.

The most fundamental reform comes thanks to state Sen. Mike Carrell, the Lakewood Republican who became sick during the session. Carrell’s measure, Senate Bill 5732, requires, for the first time, common standards and outcome measurements across the fractured county-based outpatient mental-health system. This accountability is welcome and overdue.

Also overdue is Senate Bill 5480, sponsored by state Sen. Karen Keiser, D-Kent. This bill resets the threshold for civil commitment under the Involuntary Treatment Act to allow greater input from a patient’s family and friends. The Legislature passed this in 2010 but didn’t find the $14 million necessary to fund more psychiatric beds until this year.

The public mental-health system costs at least $750 million a year in state and federal money. That’s an eye-popping number, but it helps 135,000 people recover, build better lives and avoid even more costly hospitalization or incarceration. It is a core function of government. And it is an obligation of our shared humanity.

This session’s laudable mental-health package undoubtedly gained urgency from recent gun-violence tragedies, so it is perplexing that Senate Bill 5478, which would require defendants in mental-health court to surrender firearms, died in committee. It is worth trying next year.

But this year, the Legislature made notable progress on a vital issue.