The SNP won the highest number of seats in the Scottish Parliament in the 2007 election and Salmond was subsequently appointed First Minister. Swinney served under Salmond as Cabinet Secretary for Finance, Employment and Sustainable Growth from 2007 to 2014. After Nicola Sturgeon succeeded Salmond, she appointed Swinney as Deputy First Minister of Scotland in 2014. He also served as Cabinet Secretary for Finance, Constitution and Economy, until that role was divided into two posts in the second Sturgeon government as a result of the expansion of the Scottish Parliament's financial powers; he was then appointed Education Secretary.