The village of Vernon Hills, IL, and its park district reached an agreement on Tuesday with the Central Lake YMCA to purchase the financially strapped fitness facility just days before the Y was set to close.

After weeks of negotiations and a rejected $1.4 million offer to purchase the facility, the YMCA is now a village-owned, park district-operated fitness center, the Vernon Hills Review reported.

As part of the agreement, the Central Lake YMCA will remain open with regular services while the village and park district perform inspections, get needed licenses, make staff decisions and finalize paperwork. The inspections will address maintenance concerns, including the Y’s damaged roof, which could cost the village $200,000 to repair, and the need for a pool lift to comply with the Americans with Disabilities Act, which could cost $6,000 to $8,000.

Park Board President David Doerhoefer told the Vernon Hills Review that the purchase would change the YMCA in name only and that the members, membership rates and staff would stay the same. More than 3,000 people belong to the Central Lakes Y.

The final purchase price was not disclosed after the YMCA board rejected the initial $1.4 million offer. The Y was assessed at $2.25 million and owes approximately $6 million on its locations in Vernon Hills and Waukegan, IL. YMCA officials had initiated a campaign to raise between $5 million and $8 million by Oct. 31 to keep the facilities open, of which only $28,000 was raised. How the purchase would affect the Waukegan facility was not discussed.

The village purchased the Y using its $22 million reserve fund. The park district plans to work toward buying the facility from the village, according to the newspaper.