Proposals to turn an Edinburgh hospital into housing have been approved despite rows over the welfare of pandas at the nearby zoo.
Corstorphine Hospital will be converted into 76 apartments.
Concerns included noise affecting Edinburgh Zoo's two giant pandas, loss of trees and disabled access.
However, developers said work would not start until the pandas had been moved to a new enclosure.
There will be 30 flats in the original listed building, 24 apartments in two new extensions to the rear and 22 apartments in a new building.
Developers, Dundas Estates, told councillors that the company has "agreed strict management controls for the protection and wellbeing of all the animals in the zoo".
John Campbell, director of the developers, added: "The main focus of our proposal is to ensure the C-listed building is preserved and brought back into use.
"Edinburgh Zoo has been an important consideration throughout the process."
The council will now be required to inform the Scottish government that the plans have been approved after ministers said the implication on pandas "could raise issues of national importance".
The City of Edinburgh Council's policy for developments with more than 12 homes is to have 25% affordable housing.
However, councillors heard there would be a £3.23m shortfall if the affordable housing was to be built on the site so "just wasn't possible".
Instead a commuted sum of money will be handed over to the council to build affordable housing.
Planning officers said that while 48 out of the 89 trees on the site would be removed during landscaping, they were "non-native or in poor condition".
Chas Booth, co-convener of the Green Group on City of Edinburgh Council, called for the proposals to be rejected over poor access to the Corstorphine Hill site for people with disabilities, saying it was "extremely concerning" that the lack of infrastructure could breach the 2010 Equality Act.
Developer Jeremy Scott said: "We are not changing the gradient, we are just retaining what's there on site. If it was fully compliant, it possibly would ruin the character of the site."
Vice planning convener Maureen Child said there was a balance between making the site more accessible and retaining landscaping and that any additional measures could be "in danger of destroying" the character of the listed building.
Ms Child, who supported the plans, added that developers could not "essentially level Corstorphine Hill".
Councillors voted in favour of approving the proposals.
A revised landscaping scheme will be submitted to the council, including improved disabled access. It will be approved by councillors rather than officers under delegated authority.
Planning convener Neil Gardiner said: "We hope developers will endeavour to make it as suitable as possible for disabled access. This wonderful building is being restored and that's going to be a massive benefit to the neighbourhood."