The Registrar General is to retire after having made a "major contribution to Scotland".
George Mackenzie is standing down from the positions of both Registrar General and Scotland's Keeper of Records.
He has held the latter role since January 2001 and in April last year he also took on the job of Registrar General after the merger of National Archives Scotland and the General Register Office for Scotland into the new body National Records of Scotland.
Culture Secretary Fiona Hyslop paid tribute to Mr Mackenzie and said: "During his time as Scotland's Keeper of the Records and Registrar General, George has made a major contribution to Scotland by ensuring that Scotland's people have easy access to their rich heritage and ancestry.
"He leaves the National Records of Scotland in a strong position having overseen the merger of two important organisations, looking after our archives and safekeeping significant documents that will become the treasures of Scotland's future."