Preston City Council has agreed to swap land with housing provider the Community Gateway Association to preserve green space where housing was opposed by local people.
The council will swap six acres at St Paul's Road, Deepdale for land owned by Community Gateway Association at Truro Place, Fishwick, known locally as Paul's Pad.
The land at Truro Place is a valued community space, which the Friends of Fishwick & St Matthews have been seeking to protect from a housing development.
Preston City Council's larger piece of land at St Paul's Road is earmarked for housing development. By agreeing to exchange land, one area of the city benefits from affordable housing whilst another retains a community space.
Diane Bellinger, chief executive of Community Gateway, said: "We know that Preston has a shortage of affordable homes. So St Paul's Road, a former council depot site, will see the development of a number of mixed tenure properties – some will be for rent, some for shared ownership and some for outright sale. These will provide much needed affordable homes on a site which will lead to a complete regeneration of the area. Currently the plans are to build 28 homes, with more to follow in the coming years."