PORTLAND, Ore. (AP) — Five major hospitals in Portland, Oregon, and a nonprofit health care plan said Friday they will donate a combined $21.5 million toward the construction of nearly 400 housing units for the city's burgeoning homeless and low-income population — a move hailed by national housing advocates as the largest private investment of its kind in the nation.

The money from the private health care providers will be part of a larger $69 million capital construction plan that comes as the booming Pacific Northwest city struggles with a seemingly intractable homeless problem that has become more visible in the past few years and poses a political quagmire for local leaders.

Earlier this month, hundreds of people were evicted from an informal tent camp on a nature trail on the city's east side, and the city has fielded thousands of complaints on a hotline for residents as leaders debate repurposing an abandoned warehouse and a vacant jail as temporary shelters.

"I'm incredibly excited about the impact that this project will have, but what I'm even more excited about is the example that we are setting," said Joe Robertson, president of Oregon Health & Science University. "Most of the story is already written by the time these people show up in our health system, so we have to do something and do it in a manner that is different than what we've done before."

In addition to the money from the health care providers, the city housing bureau will chip in about $9 million and Central City Concern — a nonprofit provider of low-income housing that will own and manage the three new buildings — will finance the remainder of the $69 million through tax credits, loans and private fundraising.

The investment comes at a critical time for Portland. The city is booming but skyrocketing rents, cripplingly low vacancy rates and a severe shortage of affordable housing created such an urgent situation earlier this year that the city made it legal for six months to sleep on city streets.

Nearly 1,900 people sleep outside each night; 88 homeless people died on the streets in 2015, up sharply from 56 the year before.

The housing will feature a total of 382 housing units in three apartment complexes in strategically targeted areas of the city, including a North Portland neighborhood where many residents have been displaced by rapid gentrification.

One site will include a medical clinic for people with mental illness and drug addiction along with additional hospital-style housing for homeless people who are dying, recovering from serious illness or surgery, or transitioning from a mental health crisis.

Construction is expected to begin in 2017 and the housing should be completed by 2018.

Hospitals and hospital systems elsewhere in the country have opened low-income housing, but the donation announced in Portland would be the largest and most expensive nationwide, said Robert Friant, spokesman for the New York City-based Corporation for Supportive Housing. The nonprofit group champions low-income housing and works in 40 states and 300 cities nationwide.

Studies have shown that 70 percent of a person's health outcome is determined by social factors, such as their housing status, income, level of education and support network, he said. The hospitals in Portland should benefit in the long-run by driving down the number of expensive emergency room visits and other reactive care needed by those placed in the housing, he added.

"That stability that comes with a home allows them to make regular doctor's appointments," Friant said. "We've had people who've had to spend months in a hospital because they've been homeless and their health has deteriorated."

It's a story that Isabel Hartshorn knows well. The 36-year-old mother was homeless in Portland for eight years before getting an apartment and starting training recently as a carpenter. When she was on the street, she once got such a bad cough she broke a rib.

"I had walking pneumonia for days. There was nothing that they could do about it," she said. "I had to walk around like that. There wasn't shelters available."