A bank’s foundation is giving $300,000 to a Portland nonprofit organization to try to help reduce homelessness in Maine.

KeyBank Foundation says it will make the grant to Preble Street over the course of three years. The bank says the money will help improve Preble Street’s “Housing First” support service work.

The money is also expected to help increase permanent supporting housing for people who suffer from chronic homelessness.

Preble Street’s Executive Director Mark Swann said the grant will help the nonprofit keep homeless people out of the “endless cycle of shelters, emergency rooms, jails and detox programs.”