First Salmond government
The first Salmond government, which was sworn in on 17 May 2007 at the start of the 3rd Scottish Parliament, was a SNP minority government. Having won the largest number of seats in the general election (47 of 129) the SNP sought to form a coalition with the Scottish Liberal Democrats. When those talks failed, the SNP chose to form a one-party minority government. The SNP and Scottish Greens signed an agreement where the Greens supported SNP ministerial appointments, but did not offer support for any confidence or budget votes ("confidence and supply"). SNP leader, Alex Salmond was elected First Minister on 16 May 2007; he was officially sworn in and his slate of ministerial appointments were ratified by the Scottish Parliament the following day.
Due to the agreement signed with the Greens, Salmond's investiture vote was successful despite only having 47 of 129 seats in the Parliament. The vote was 49–46, with the SNP and Greens voting in favour and the 46 Scottish Labour MSPs voting against, with the Conservatives and Liberal Democrats abstaining.
On 16 May 2007, a few hours after Salmond was sworn in by parliament, he announced his intention to form a government composed of five cabinet secretaries and ten junior ministers. Furthermore, the Lord Advocate lost her seat in the cabinet.