Scottish election: SNP changes Edinburgh political map
Edinburgh has woken up to a changed political map as the SNP claimed five of the available six seats.
Kenny MacAskill, who authorised the release of the Lockerbie bomber from prison, won Edinburgh Eastern by more than 2,000 votes.
The SNP took seats from Labour, the Lib Dems and Conservatives in the capital.
Labour was the only other party to win a seat in the capital with Malcolm Chisholm taking Edinburgh Northern and Leith by 595 votes.
Edinburgh Central was won by the smallest margin of 237 votes by SNP's Marco Biagi over Labour's Sarah Boyack.
Edinburgh Western was taken by Colin Keir from SNP with 11,965 votes compared with second place Margaret Smith's 9,276 votes for the Liberal Democrats.Iain Gray
A big upset for the Conservatives came when David McLetchie lost Edinburgh Pentlands to SNP's Gordon MacDonald by 1,758 votes.
SNP's Jim Eadie took Edinburgh Southern by 693 votes over Labour's Paul Godzik.
There was also another SNP victory in the Midlothian North and Musselburgh seat, with Colin Beattie beating Labour's Bernard Harkins by 2,996 votes.
In Linlithgow, Fiona Hyslop took the seat for SNP over Labour's Mary Mulligan by 4,091 votes.
Scottish Labour leader Iain Gray kept his seat in East Lothian. Mr Gray won with 12,536 votes compared to 12,385 votes for SNP challenger David Berry.
The Dunfermline seat was taken by SNP's Bill Walker who got 590 votes more than second place Alex Rowley of Labour.
Fife Mid and Glenrothes was won by SNP's Tricia Marwick. She had 4,188 more votes than Labour's Claire Baker, who came second.
Fife North and East was taken by SNP's Roderick Campbell who received 11,029 votes compared with the 8,437 votes for the Liberal Democrat's Iain Smith.
SNP's David Torrance grasped victory by just 182 votes in the Kirkcaldy seat, with Labour's Marilyn Livingstone coming second.
Meanwhile, the independent Margo Macdonald has been returned to the Scottish Parliament as a list MSP in Lothian.
Scottish Labour's Sarah Boyack, Kezia Dugdale and Neil Findlay were also elected as list MSPs.
Scottish Conservatives David William McLetchie and Gavin Brown were also elected on the list, along with the Scottish Greens' Alison Johnstone.