Princess Anne, the Princess Royal, visited Bothwell Parish Church for the re-dedication of the quire at the historic building.
She was welcomed by Rev James Gibson to a service which followed a refurbishment project costing £2 million.
Work focused on the 14th century quire at the back of the building. Masonry fell from the ceiling six years ago, prompting a major programme to secure the 800-year-old foundations, stabilise the walls and replace stone slabs on the roof.
With the quire deemed unsafe, it had been boarded off from the rest of the church. It re-opened last year.
Following the service Princess Anne took time to chat with members of the congregation in the parish centre.