Image caption The leaders of Labour and SNP have agreed to work in coalition

Labour and the Scottish National Party have struck a coalition deal to run Edinburgh City Council.

Both parties gained seats in last week's elections, leaving Labour with 20 and the SNP with 18 out of the 58 councillors in the city.

The council had previously been run by the Liberal Democrats and SNP. Lib Dem Jenny Dawe, the former council leader, lost her seat after Thursday's vote.

Talks are continuing in many other areas to form council administrations.

Andrew Burns, Labour group leader, said: "After listening to the will of the electorate and after intense negotiations over the last few days, I am delighted that we have managed to reach an agreement to lead the city of Edinburgh for the next five years.

"Edinburgh electors gave a very clear mandate to Labour and the SNP, delivering 38 out of 58 councillors.

And so Labour and the SNP are to share power in the capital - as an onlooker and occasional resident I would simply wish them loadsaluck, especially with the trams.

"A Labour-SNP coalition will now provide the stability and certainty needed to move Edinburgh forward."

Steve Cardownie, SNP group leader, said: "With this strong partnership we are best placed to ensure Edinburgh serves its citizens well and emerges from the recession quickly and strongly.

"Our groups' economic policies can complement one another and we are confident they will deliver for the people of the city."

The Labour Party will nominate candidates for leader and lord provost, while the SNP will nominate candidates for deputy leader and deputy lord provost.

The first meeting of the new council is on Thursday 17 May, where the new positions will be announced.

The SNP has formed also an administration in Midlothian with the support of Green councillor Ian Baxter.