The trust hopes to build a visitor centre on the Moat Brae site
A campaign group hoping to preserve a Dumfries mansion that inspired the classic children's story Peter Pan has secured the property for £1.
Loreburn housing association, which owns Moat Brae House, had intended to turn the site into housing.
However, it has now agreed a deal to sell the building to the Peter Pan Moat Brae Trust (PPMBT).
The trust has ambitious plans for the site, including creating a flat for respite care of sick children.
Author JM Barrie credited the gardens at the Dumfries building as the inspiration for his classic work.
It has had a number of uses since Barrie's day, but has been allowed to fall into disrepair in recent years.
Loreburn bought the building in an effort to safeguard it and "do something good for the town".
However, the PPMBT campaigned against moves to turn the site into housing.
Loreburn's convener, Iain Agnew, said it now felt the trust was "best placed" to lead the restoration project.
"We urge everyone to now ensure that Dumfries and Galloway has an attraction of international significance," he said.
PPMBT chairman Roger Windsor said the move was proof that "dreams do come true".
He said: "We need immediate remedial work to stop further deterioration and the trust will be concentrating its initial efforts in raising funds to this end.
"Work has already commenced to re-establish 'Neverland' on the banks of the Nith, and to restore this beautiful house as a cultural inspiration for the whole community.
"We also acknowledge Loreburn's contribution in securing and saving the subjects for the benefit of the Dumfries community, and making it available to the trust to restore."
Among the plans for the site are the construction of a visitor centre, shop and cafe.