A key ally of Nicola Sturgeon in Glasgow has lost her council seat in a local election upset.
Mhairi Hunter - a senior Nationalist in the City Chambers - lost out at the second stage of the count in the Southside Central ward.
The SNP look set to remain as the largest party in Glasgow but are being squeezed by better than expected performances from Labour and the Greens as results continue to be counted.
Hunter works in the constituency office of Sturgeon and is a well-known SNP figure on social media.
Reacting to her loss, she tweeted: "Well I didn't expect today to go like this.
"A combination of Green and Alba votes leaves me no longer a councillor. Pretty ironic really.
"Still, more time to campaign for independence. Onwards and upwards.".
Speaking to reporters after counting had finished in Glasgow, Sturgeon paid tribute to Hunter's record as a councillor.
"Mhairi is a personal friend of mine and has been a campaign colleague over many years," the First Minister said.
"I am gutted for Mhairi. She has been a brilliant councillor and has been made a difference in the ward."
The SNP leader added: "Mhairi will be back campaigning for the SNP before we know it."
The Southside Central ward returned two Labour councillors - a gain of one - as well as one Green and one from the SNP.
Susan Aitken, the SNP leader in Glasgow, had earlier said her party had achieved a "very mixed" set of results in the city.
But senior Green and Labour members were delighted by their performance on Scotland's largest local authority.
Patrick Harvie hailed a "phenomenal" performance by his party while Malcom Cunning said it was Labour's best result in Glasgow since the 2014 independence referendum.
To sign up to the Daily Record Politics newsletter, click here.