text: Moat Brae in Dumfries has been a private house, a nursing home and harboured hopes of being turned into a themed hotel.
  It has gone to the brink of demolition and back but now its future finally looks secure.
  The mansion, designed by architect Walter Newall for a local solicitor, will now become a national centre for children's literature after raising Â£5.3m in capital funding.
  It has been a dramatic journey very much in the spirit of author JM Barrie who studied at Dumfries Academy and played in Moat Brae's gardens as a child.
  Born in Kirriemuir in Angus, he moved south in 1873 at the age of 13.
  In his memoirs published in 1904, he wrote of Peter Pan: "Our escapades in a certain Dumfries garden which was an enchanted land to me was certainly the genesis of this work."
  That was during Moat Brae's first life as a private home but, for many Doonhamers, it is best remembered in another role.
  Until the 1990s it was run as a private hospital/nursing home.
  However, when that operation was closed, the building at the back of Dumfries Academy faced an uncertain future.
  It sat empty for some time before eventually being sold at auction to a private buyer in late 2000.
  There were hopes that its fortunes could be transformed but talk of a grand hotel never came to fruition.
  Instead, the property remained empty and became a target for vandals as its sorry decline continued.
  In January 2003, furniture inside the building was set on fire, a number of windows and fittings smashed and plasterboard ripped from walls.
  It was estimated that it would cause Â£200,000 to repair, prompting fresh calls for action to help safeguard its future.
  Yet there would be five more years of deterioration before the building was put up for sale once more.
  It was secured by the Loreburn Housing Association (LHA) in May 2008.
  They wanted to create a residential development as well as a visitor centre but not everyone approved of the proposed project.
  In August 2009, the Peter Pan Moat Brae Trust (PPMBT) served an interim interdict on LHA to stop their overhaul works which would have seen the facade retained but much of the rest of the building demolished.
  It came just days before the bulldozers were set to move in.
  Later that year the housing association agreed to sell the building to the trust for Â£1.
  Convener Iain Agnew said it now felt the PPMBT was "best placed" to lead the restoration project.
  But that was just the start of another difficult voyage - raising the funds needed to convert the building into a centre for storytelling and children's literature.
  That goal sometimes seemed as distant and imaginary as Neverland but slowly but surely it gathered momentum.
  The drive and determination of the PPMBT - and generosity of numerous groups and individuals - has put the resources in place to create what they hope can be a major visitor attraction.
  It should provide a happy conclusion to the Moat Brae tale which JM Barrie himself would have been proud to have penned.
target: The grand sandstone building which helped to inspire the Peter Pan story has known a few adventures of its own over its 193-year history.