The Scottish Office was a department of the Government of the United Kingdom from 1885 until 1999, exercising a wide range of government functions in relation to Scotland under the control of the Secretary of State for Scotland. Following the establishment of the Scottish Parliament in 1999, most of its work was transferred to the newly established Scottish Executive (now officially the Scottish Government), with a small residue of functions retained by the Scotland Office.