The former toilet block in the High Street has been sold to the newly created Knaresborough Community Land Trust (KCLT).
The facility – near the Town Hall – closed in 2015 after the council declared surplus to requirements, despite local opposition. It was demolished a year later and has been vacant ever since.
Harrogate Borough Council was given a grant of £585,000 in 2017 to promote community led housing schemes across the district.
The £50,000 purchase price of the toilet block has been financed through this grant.
Selling to KCLT means affordable housing can be built and retained for the benefit of the local community for years to come.
This is unlike affordable homes built by the council itself which are currently subject to right to buy rules.
The Trust will be expected to meet a number of conditions before the site is transferred.
They include a guarantee that the land will not be sold-on and that the site is developed within three years of planning permission being granted.
Community-led housing schemes are usually smaller scale and are designed to provide the homes local communities require, rather than sites being developed for private profit.
Knaresborough Community and Land Trust launched on Friday.
Councillor Mike Chambers, cabinet member for housing, said:
We all know that more affordable homes are needed in Harrogate district – both by definition – and in real terms.
Community-led schemes have the potential to help us ensure housing can be provided by, and for, the local residents who need it the most.
I am pleased that this sale will mean a new lease of life for a site which has been out of use for several years.