Engineers had predicted the imminent collapse of Moat Brae house
Work is about to begin to save the historic house that helped inspire the JM Barrie classic Peter Pan.
Moat Brae house in Dumfries was bought last year by housing association Loreburn in order to safeguard the property for the town.
The building had fallen into such a state of disrepair that engineers warned of its imminent collapse.
Loreburn has now accelerated its works to put the site to residential use as well as creating a visitor centre.
JM Barrie was born in Kirriemuir in Angus but moved to Dumfries in 1873 at the age of 13.
Two of his childhood friends lived at Moat Brae, a place he later credited as his inspiration for Peter Pan.
The deteriorating condition of the building has been the cause of local concern for a number of years as it has been attacked regularly by vandals.
Loreburn's convener Maureen Farrell said: "As local people, Loreburn's voluntary management committee members watched this sad decline with frustration and dismay.
"When the property eventually came on the market we had to act quickly to prevent it falling into the hands of another speculative developer.
"We were motivated by our desire to ensure that Peter Pan was recognised as a 'son of Dumfries' and that this connection was celebrated."
Loreburn now intends to start work making the property safe and preserving its facade.
It will then work with community group the People's Project and the nearby school Dumfries Academy to restore its gardens and create a visitor centre.
"There is still a long way to go, but with the continued support of the people of Dumfries, Loreburn and its partners can achieve something very special for this area," said Ms Farrell.
"Dumfries will then at long last mark the true birthplace of Peter Pan."