Residents fighting plans to turn a former toffee factory into ten flats have decided to buy the site themselves.

The move means the future of the land in Harrogate has been thrown into confusion.

Residents calling themselves The Toffee Factory Redevelopment Group have announced that they have agreed to purchase the former Farrah's Toffee Factory, in Back Chatsworth Grove, off King's Road.

The group said it expected the deal to go through shortly, despite Harrogate Borough Council narrowly voting in favour of the flats development, which had been submitted by Yorkshire Housing Association.

The residents' group said its members were so strongly opposed to the development, that they decided to buy the site to block the plans.

Previous unsuccessful attempts had been made to secure planning permission for homes, and group members decided to buy the site ahead of the councillors' vote in favour of development.

Yorkshire Housing Association's proposals envisaged affordable housing on the site.

The factory was home to the famous Harrogate toffee firm John Farrah, which moved because it had outgrown the premises and now has a modern factory in Starbeck, Harrogate.

Back Chatsworth Grove was even visited by the Queen when she toured Farrah's factory in December 1998, to see the old fashioned method of making the confectionery.

The company's secret toffee recipe, which is still kept under lock and key, was created in the town's Victorian spa heydays.

Toffees were originally sold to visitors in a bid to combat the unpleasant taste of some of Harrogate's spa waters.

The residents' deal to buy the land will pave the way for them to table a new planning application for a different development.

However, the group has not ruled out some affordable housing.