Scottish First Minister Nicola Sturgeon has hit back at Sadiq Khan's comments likening Scottish nationalism to racism, saying they were a sign of Labour's "desperation".
Ahead of the Scottish Labour conference, the mayor of London had said there is "no difference" between Scottish nationalists and those who try to "divide us on the basis of our background, race or religion".
Speaking at the Scottish Labour conference, Mr Khan denied he was calling the SNP "racists or bigots".
In a series of tweets, Ms Sturgeon said Mr Khan's comments were a "sign of the sheer desperation and moral bankruptcy that has driven so many from Scottish Labour's ranks".
The SNP leader tweeted that she was a "big admirer" of the London Mayor but that "today's intervention is spectacularly ill-judged".
She added: "It is an insult to all those Scots who support independence for reasons of inclusion & social justice - the antithesis of what he says.
"And it is a sign of the sheer desperation and moral bankruptcy that has driven so many from Scottish Labour's ranks. Very disappointing."
Her comments come after Mr Khan expressed his concern about Scottish independence.
Writing in the Daily Record newspaper, he said: "The last thing we need now is to pit different parts of our country or sections of our society against each other - or to further fuel division or seek separation."
Mr Khan said London and Scotland - which both voted overwhelmingly to stay in the EU at last year's referendum - are "twin beacons of progressive values and hope within the United Kingdom".
He stated: "Despite our shared values, there are some in Scotland who are determined to define London as Scotland's enemy - to turn us against each other."
He warned that the "world is becoming an increasingly turbulent and divided place" with the election of Donald Trump in America, the vote to quit the EU and the "rise of right-wing populist and narrow nationalist parties around the world".
Mr Khan insisted: "The antidote to Brexit and the rise of right-wing populist parties is not to run away, break away or push our neighbours away. It's to lead in a different direction - the right direction."