SIR William Kerr Fraser, of Gifford, a former permanent secretary at the Scottish Office and one of the foremost public servants of his generation has died. He was 89.

Mr Fraser was born on March 18, 1929 in Glasgow, the only son of Alex and Rachel.

After excelling at Eastwood High School, he matriculated at the University of Glasgow – where he later served as principal and chancellor – to study for an ordinary MA and then a law degree.

During his time at university, he was chosen to represent British students at a conference in Peking, making him one of the first westerners to visit the country after the revolution, and during the Korean War.

He caught the attention of a younger student politician, Marion Forbes and, in 1956, they began 60 years of married life, having four children by 1964.

On leaving university in 1952, Mr Fraser took a three-year service commission in the Royal Air Force; thereafter he worked for the Scottish Office in Edinburgh, where he remained for 33 years.

He returned to the University of Glasgow in 1963 on a research fellowship and was secretary tot the commission looking into the reform of local government – he was influential in the plan that saw regions and districts replace burgh and county councils in 1974.

In 1966-67, he was private secretary to Willie Ross, the then Secretary of State for Scotland – in that role he was at the centre of a Cold War exchange of visits between Mr Ross and Alexei Kosygin, the Soviet Union’s foreign minister.

And in 1978, Mr Fraser was chosen, aged 49, to succeed George Pottinger as permanent secretary of the Scottish Office. He remained in that post for 10 years, working alongside Scottish Secretaries Bruce Millan, George Younger and Malcolm Rifkind.

He was knighted in 1979, and in 1994 awarded the more senior honour of GCB – Knight Grand Cross of the Order of the Bath.

In 1988, he became principal of Glasgow University on a seven-year contract and he and his wife, Lady Marion, took a keen interest in student affairs.

The couple were jointly honoured with the naming of the Fraser Building, housing student services at the university.

From 1996 until 2006, Mr Fraser was the university’s chancellor. He continued to play an informal role in public life, providing advice in the preparation of devolution legislation in 1998.

Retirement in Gifford provided a different welcoming community for the couple, and a garden to tend. By this time, Lady Marion Fraser had her own later life career in the voluntary sector, across the Kirk, arts and mental health sectors and became UK chairwoman of Christian Aid.

She was appointed Lord High Commissioner to the General Assembly of the Church of Scotland, and a Lady of the Order of the Thistle. However, these Gifford years saw growing ill-health and immobility – her husband was a full-time carer, though he never cared for that description.

She died on Christmas Day, 2016. Mr Fraser was determined, sometimes stubbornly, to continue living independently but ill-health took its toll on him too.

He is survived by his children Graham, Andrew, Lindsey and Douglas, and his grandchildren Alasdair, Colum, Robert, Roseanne, Patrick and Mora.