In an East Oakland neighborhood on the verge of gentrification, when an affordable apartment complex went up for sale–and tenants there risked steeply rising rents–Kaiser Permanente, the largest private integrated healthcare system in the U.S., helped put up the money to buy the building and keep rent low.

It’s the first impact investment for the Oakland-based company’s $200 million Thriving Communities Fund, and one of three major projects the company announced today. Along with the nonprofit Enterprise Community Partners, Kaiser created a new joint equity fund called the Housing for Health Fund and contributed $5.2 million to help a local nonprofit, the East Bay Asian Local Development Corporation, purchase the building for $8.7 million. In a second nationwide loan fund, Kaiser and Enterprise are each committing $50 million to create and preserve affordable housing in the markets that Kaiser serves with its integrated system of health insurance, hospitals, doctors, and medical groups. Kaiser also announced plans to find housing for more than 500 people in Oakland who are over 50, homeless, and have at least one chronic health condition.

“We have been learning over the years that homelessness and inadequate housing are major health issues,” says Bechara Choucair, a physician and chief community health officer for Kaiser Permanente. “We know that safe and stable housing is a key determinant for both physical and mental health. And really, without a place to live, it’s pretty much impossible for a person to take care of their basic health needs.”

Someone without stable housing is likely to die decades younger than someone who has a home. They’re more likely to have diseases like hepatitis or tuberculosis. If they’re admitted to a hospital, they’re more likely to stay longer, and more likely to be readmitted. One study that looked at emergency rooms in Boston found that people who were homeless used the ER four times more than those who are not. It’s costly for the healthcare system, and it’s difficult for doctors to successfully treat someone if that person is forced to return to the street.

Over several years, a growing number of hospitals and health care organizations have started taking steps to tackle housing as a means to improve the health of their patients. In Chicago, for example, the University of Illinois Hospital partnered with the nonprofit Center for Housing and Health to help get some of its most vulnerable patients–homeless “super users” who spent an extraordinary amount of time in the ER–into supportive housing. In Columbus, Ohio, Nationwide Children’s Hospital invested in renovating dilapidated housing in its own neighborhood and built new affordable housing. In Northern California, Sutter Health is leading a $30 million campaign to try to end homelessness in three Sacramento-area counties. Hawaii considered (but did not pass) a bill that would let doctors prescribe housing for people who are homeless after seeing huge drops in healthcare costs when it housed some of its homeless population.

Kaiser itself has made several donations to support housing, including $2.27 million to nonprofits in the Pacific Northwest to help find permanent housing for homeless people struggling with mental illness and addiction, more than $4.9 million for programs to support the homeless in Southern California, $4 million to build new housing in Portland, Oregon, and $9 million to help low-income residents in Oakland avoid homelessness.

The company will continue to make donations. But in May 2018, the company announced the creation of the new Thriving Community Fund as a way to address housing stability and homelessness through impact investing as well. The equity fund used to buy the apartment building in Oakland, and the fund used and offer loans in the markets where Kaiser works nationwide, are examples of impact investing that will give both social and financial returns. “It’s part of our overall strategy to make sure that we have the means to keep replenishing the funds to impact more lives,” says Bernard J. Tyson, chairman and CEO of Kaiser Permanente.