Councillors have approved re-drawn plans for 323 homes on the site of the former Royal Cornhill Hospital in Aberdeen.
The planning development management committee voted by 10-2 to support the joint application from Stewart Milne Homes, Barratt East Scotland and NHS Grampian, subject to conditions.
Several bids have previously been tabled to develop the vacant site, which was declared surplus to requirements by the health board in 2002.
In 2013, a similar application was withdrawn before it was even considered by elected members.
Approval of the scheme is now dependent upon a legal agreement for 25% affordable housing and developer contributions for education, roads and community facilities.
The deal will also cover a “car club” scheme for future residents to help mitigate a shortfall in parking spaces
There will be 460 spots, but council officials said there should be 493 berths for that size of development.
Former hospital buildings will be demolished to make way for 89 houses and 198 flats, while the five upper hospital buildings will be converted into 36 flats.
Berryden Road is earmarked as the main access point into the development, with a second access on May Baird Avenue for emergency vehicles, cyclists and pedestrians.
Committee vice-convener Andy Finlayson said: “We have waited a long time for an acceptable scheme to come forward for this site.
“City council planning officials have worked hard to negotiate the best possible scheme in terms of open space, layout, designs and affordable housing provision, and I am pleased that it is moving forward at last.”
Rosemount and Midstocket ward councillor Bill Cormie added: “The planners and the developers have done well to maintain the grass and courtyard areas, as well as the amount of granite they have managed to retain.”
Mr Cormie did raise some concern, however, over the impact on local schools, particularly if long-delayed plans to redevelop the nearby Broadford Works site come to fruition.
Meanwhile, a separate application for listed building consent to install barriers at Union Bridge aimed at deterring suicide attempts was unanimously rejected.
The proposal had been recommended for approval, but even those councillors who had supported the plans originally were not happy with the preferred design.
Aberdeen City Centre Community Council also objected to the plans, which comprised of a steel parapet with vertical posts and horizontal wires.