Portland and Multnomah County have reached a deal to salvage several programs that were on the chopping block as Portland copes with a severe deficit.

A joint announcement from Mayor Charlie Hales and County Chair Jeff Cogen says the agreement will benefit the entire community. Under the deal, the city would kick in its share of funding for a mental health crisis assessment center, estimated at over $600,000.

The County, in turn, would pick up the city's share of funding for a needle exchange program and one-stop domestic violence center. It would also provide one-time funding for some senior centers and split the cost of three after-school SUN community programs for one year.

David Berkson is a parent who went to the city's budget meeting Thursday night to lobby for SUN program funding. He praised the last-minute deal.

Berson said witha laugh, "I just wanted to say thank you, thank you so much. It's really happening, right?

The County has balanced books this year, whereas Portland faces a $21 million shortfall.

Both sides have yet to work out long-term funding solutions for the SUN program, among others. The city and county each have two public budget hearings remaining before adopting their final drafts.

This story originally appeared on Oregon Public Broadcasting.