Sweetser, a nonprofit mental health organization, has received $800,000 from the Blue Hill-based Next Generation Foundation.

The money will be used to improve safety and security systems for Sweetser employees and at The School at Sweetser in Saco. It also will be used to update residential units and increase energy-efficiency at the Saco campus.

“This incredibly generous gift allows us to make necessary upgrades to our facilities, which we have only been able to plan for in previous years and make small advances toward,” said Sweetser President and Chief Executive Officer Debra Taylor in a prepared statement.

Founded in 1828, Sweetser provides mental health services to more than 20,000 children, adults and families annually throughout Maine.