The SNP has won the East Lothian constituency from Labour, the first to change hands in this election.
Paul McLennan won 17,968 votes in the seat, which was held by former Labour leader Iain Gray until his retirement this year.
Mr Gray boasted a majority of 1,127, but after a 2.58% swing that has now shifted to a 1,179-vote lead for the SNP.
Scottish Labour candidate Martin Whitfield won 16,789 votes with a turnout of 69%.
In the last parliamentary term, the SNP held 63 seats, just two shy of an overall majority.
While the First Minister has attempted to play down the likelihood of an overall majority, her party is now just one gain away – provided it holds all of its current seats.
The Scottish Tories won 9,470 votes in East Lothian, while the Liberal Democrats took 1,556.