BANGOR, Maine — The sale of the former YMCA on Hammond Street to Penobscot County was finalized Thursday, a day after the city condemned the building.

The locks were expected to be changed Thursday afternoon but the former occupants and owner would be able to retrieve personal property from the building, County Administrator Bill Collins said.

The county purchased the more than 50,000 square-foot building for $825,000 from 127 Hammond St., LLC, after threatening to take it by eminent domain.

Sheriff Troy Morton has proposed using the building to expand programs and relieve chronic overcrowding at the nearby jail, but the county first needs to evaluate its space needs, county commissioners have said. Once that is done, it will hire an architect and a construction firm to plan and start renovations.

The city said the condemnation was the result of the building not having a working sprinkler system or fire alarm when it was occupied by a church and a mixed martial arts studio, which both had temporary occupancy permits.

The church, CityReach Bangor, has found a new home in a vacant space at the Bangor Mall, it announced Sunday. The Rev. Bobby Bledsoe, pastor of CityReach, said the church’s Thursday evening outreach activities, which include free dinners and clothing for the needy, will take place at Bangor Waterfront.

The church will keep searching for a permanent location in a new building or one that can be overhauled to meet its long term needs, the pastor said earlier this week.

Chris Young, owner of Young’s MMA, said Thursday that he had not yet found a new location but expected to announce soon where and when programs would resume.

The company that sold the building is owned by the estate of William Buxton, who bought the building in 2013 for a denturist school before abandoning those plans. He died in 2016.

The company has a large lien on the property but it and mortgage holder TD Bank signed off on the short sale to Penobscot County.