Princess Anne met residents and staff of Waverley Care Home, pupils from Galashiels Academy, local carers and veterans.
The visit also came just four days before the Princess attends her mother's funeral at Westminster Abbey.
Princess Anne is President of the Carers Trust and is known for her work supporting vital care charities and for her many military connections.
Princess Anne arrives in Galashiels
After meeting care home residents inside, Her Royal Highness went on to meet and chat with a group of senior Galashiels Academy pupils and Headteacher Kevin Ryalls, followed by a group of home care and care home staff.
She then went on to meet a group of local veterans, led by Councillor John Greenwell - Scottish Borders Council’s Champion for the Armed Forces and Veterans.
Convener of Scottish Borders Council, Councillor Watson McAteer, said: "It is always a great honour for the area to host members of the Royal Family and given the recent passing of Her Majesty The Queen this has been a particularly poignant event."
Want a quick and expert briefing on the biggest news stories? Listen to our latest podcasts to find out What You Need To Know...