A leading Labour strategist has been condemned for tweets referring to "Poles and Pakis" during an online spat over independence which has also involved former First Minister Jack McConnell.

Ian Smart spoke of an independent Scotland "turning on Poles and Pakis" and later likened the SNP to the Ku Klux Klan.

Mr Smart, former president of the Law Society of Scotland, is a prominent blogger on his party's affairs.

He was promoting a blog reflecting on Labour's failings following the South Shields by-election when he was asked on-line about the view that a No vote in the 2014 independence referendum could usher in a decade of Tory rule.

Mr Smart responded: "Better 100 years of the Tories than the turn on the Poles and the Pakis that would follow independence failing to deliver."

There was a flood of tweets objecting to both the use of the phrase "Poles and Pakis" and the suggestion that a post-independence Scotland would be racist. Former Socialist MSP Carolyn Leckie urged him to "stop digging".

Mr Smart responded to Ms Leckie: "Who seriously thinks I'm a racist? Only those for whom the cap fits. What are you doing in their company?"

Former First Minister Lord McConnell commented on long-time ally Mr Smart and suggested his critics may be "feeling guilty". This brought one response: "You are a former First Minister, don't get into this ****".

An SNP spokesman said of the exchanges: "It is only a few days since Labour's Douglas Alexander called for a respectful referendum debate, yet these nasty tweets have been posted by prominent Labour blogger Ian Smart.

"The tweets are highly offensive, not just to everyone who supports a Yes vote, but more particularly to Scotland's Pakistani community."

Lord McConnell said today: "I abhor racism, whoever is the target and whatever the context. I wish others were as consistent."

Mr Smart conceded last night: "I've been caught up in a bit of a Twitter storm over the last 24 hours."

But he began by blaming critics as "cybernats" and said he should have put the offending reference to "Poles and Pakis" in quotes.