Ukip has won its first parliamentary seat in Scotland after a knife-edge European election contest.

Nigel Farage's party - which dominated in England - picked up 10.4% of the vote, giving them the sixth and final seat available north of the border.
The result was delayed until today to allow for counting in the Western Isles.
It caps a remarkable European election for Ukip, which saw it stretch ahead of Labour and the Conservatives with the highest share of the vote across Britain as a whole.
In Scotland, the SNP and Labour remain on two seats each while the Tories keep their single seat.
The Lib Dems were beaten behind the Greens and lost their only seat in a dreadful UK-wide result for Nick Clegg's party.
The complicated proportional voting system meant that the SNP had to extend its share of the vote beyond one-third of the total in Scotland if it had any chance of keeping Ukip out.
But Alex Salmond's party fell just short with 389,503 votes - a 28.9% share.
The Green Party had also hoped to pick up its first seat and block Ukip, but ended with 108,305 vote (8%).
Labour saw its vote increase by five points to 25.9% with 348,219 votes, keeping its two MEPs, while the Conservatives held on to their single seat with 231,330 votes (17.2%).
The Liberal Democrats won just 95,319 votes (7.1%) and lost their only MEP in Scotland while being beaten to sixth place behind the Greens.
Turnout in Scotland was just 33.5% - which is still an improvement on 2009 when only about 28.5% of the electorate voted.
Across Scotland, turnout peaked at 43.1% in East Renfrewshire and 41.6% in Edinburgh. It was lowest in North Lanarkshire at 28.1%.