It was a mixed night for the SNP in Fife with two wins and the loss of a key seat in the general election.
Stephen Gethins lost out to Wendy Chamberlain of the Liberal Democrats in North East Fife.
She secured a win with more than a 1,300 vote majority over the SNP.
Last time in 2017, Mr Gethins held onto the constituency with a majority of just 2 votes - this represented the smallest majority across the UK in any constituency around two and a half years ago.
But there was better luck for Nicola Sturgeon's party in Glenrothes and Dunfermline and West Fife.
Peter Grant and Douglas Chapman won their third successive elections in both seats respectively.
In Kirkcaldy and Cowdenbeath, independent candidate Neale Hanvey defeated Labour's Lesley Laird with a majority of more than 1,200 votes.
The result comes despite Hanvey being suspended by the SNP last month over past antisemitic social media posts, which he has apologised for.
The suspension happened after the deadline for nominations passed meaning his name still appeared beside the SNP on the ballot papers in the constituency.
A summary of the results are below:
NORTH EAST FIFE
1st - Wendy Chamberlain, Liberal Democrats: 19,763
2nd - Stephen Gethins, Scottish National Party: 18,447
3rd - Tony Miklinski, Conservatives: 5,961
4th - Wendy Haynes, Labour: 1,707
1st - Peter Grant, Scottish National Party: 21,234
2nd - Pat Egan, Labour: 9,477
3rd - Amy Thomson, Conservatives: 6,920
4th - Jane Ann Liston, Liberal Democrats: 2,639
5th - Victor Farrell, Brexit Party*: 1,276
* = Brexit Party withdrew support
KIRKCALDY AND COWDENBEATH
1st - Neale Hanvey, independent*: 16,568
2nd - Lesley Laird, Labour: 15,325
3rd - Kathleen Leslie, Conservatives: 9,449
4th - Gill Cole-Hamilton, Liberal Democrats: 2,903
5th - Scott Rutherford, Greens: 1,628
6th - Mitch William, Brexit Party: 1,132
* = Scottish National Party withdrew support
DUNFERMLINE AND WEST FIFE
1st - Douglas Chapman, Scottish National Party: 23,727
2nd - Cara Hilton, Labour: 13,028
3rd - Moira Benny, Conservatives: 11,207
4th - Rebecca Bell, Liberal Democrats: 4,262
5th - Mags Hall, Greens: 1,258