Queen opens Sir Walter Scott's upgraded Abbotsford House
The Queen has officially reopened the former home of author Sir Walter Scott in the Scottish Borders after its multi-million pound restoration.
Abbotsford House, near Melrose, will open to the public on Thursday.
The royal visitor was given a tour of the house, which shut for major renovations nearly two years ago.
The Abbotsford Trust hopes the historic building can become both an "important cultural centre and tourist destination" for the region.
The reopening brought to an end months of construction work and meticulous preparation.
A new visitor centre has been constructed and thousands of items removed and then returned.
During her tour of the building, The Queen was introduced to guests including trustees and employees of the Abbotsford Trust and a number of Sir Walter Scott's descendants from the UK and overseas.
She also unveiled a plaque to commemorate the occasion.
The chief executive of the Abbotsford Trust, Jason Dyer, said the Queen was knowledgeable about Scott's life and works and remembered the house well from two previous visits.
Commenting on the reopening, he said: "This has been the culmination of over seven years of work and planning so it is quite incredible that this day has finally come.
"The Queen's visit is testament to the standing of Sir Walter Scott, his reputation, what he did for Scotland, the UK, and what he did for literature globally.
"I think sometimes we forget here the massive impact that he had on the world."
In a letter to Abbotsford Trust chairman, Lord Sanderson, Prime Minister David Cameron described the restoration as a "tremendous achievement".
"I can only imagine the number of dedicated people involved with a project on this scale, but everyone - no matter what their role - should be justifiably proud of what has been achieved," he said.
"It is vitally important to make the most of our built and cultural heritage in this way, to enrich the life of the local community, and also to offer visitors from near and far a taste of our nation's rich history.
"Abbotsford, Sir Walter Scott's great architectural marvel, is a true icon of its time.
"It can now stand for many years to come as a tribute to Scott's creative ingenuity."
He said he had no doubt it would "welcome and inspire future generations of great British writers and poets among its many visitors".
Scott was born in Edinburgh in 1771 but lived in the Borders for much of his life.
His most famous works include Waverley, Rob Roy and Ivanhoe and he is seen as a key figure in the development of the modern historical novel.
He purchased the farm and farmhouse, then known as Cartleyhole, in 1811.
He changed the name to Abbotsford to commemorate the monks of Melrose, who had owned the land and used the nearby river crossing.
Work continued on the building following Scott's death in 1832 and it remained in his family until relatively recently.
The Abbotsford Trust was formed in 2007 following the death of Dame Jean Maxwell-Scott, the last of his descendants to live in the house.
It launched a campaign to raise £10m in order to preserve, protect and improve the site "for the benefit and enjoyment of the public".
That was boosted in late 2009 when Scottish Borders Council agreed a £1.5m support package for the scheme.
Then, in the summer of 2010, the Heritage Lottery Fund announced it would award nearly £5m to the project.
Abbotsford House was not the only literary stopping point during the Queen's time in the Scottish Borders.
She visited the John Buchan Museum in Peebles before carrying out the official opening later in the day.