SNP activists are "biased" against people from ethnic minorities becoming party candidates, a former ally of Nicola Sturgeon has claimed.

Muhammad Shoaib, who last week quit the SNP for Labour, said SNP activists only wanted "coconut Pakistanis, not pure Pakistanis", meaning those who seemed "white inside".

He said the grassroots prejudice he faced when he tried unsuccessfully to become the SNP Westminster candidate for Glasgow Central earlier this year was "a factor" in his defection.

The SNP last night condemned the remarks as "utterly outrageous" and demanded Scottish Labour leader Jim Murphy take disciplinary action against Shoaib.

Shoaib, who joined the SNP in 2007 after almost twenty years in Labour, was a long-time ally of Sturgeon, and campaigned for in the Glasgow Southside constituency.

When he revealed his plan to return to Labour, it is understood the First Minister urged him to change his mind, as did SNP minister Humza Yousaf.

However Shoaib, 62, an immigration adviser in Glasgow and former organiser of Scots Asians for Independence, switched to Labour regardless.

He told the Sunday Herald: "The leadership of the SNP were fine with me, but as for the grassroots workers, there's a huge barrier between ethnic minorities and Scottish Nationalist activists. You ask anybody in the party."

The SNP has one ethnic minority MSP, Yousaf, and one Westminster candidate, Tasmina Ahmed Sheikh in Ochil and South Perthshire.

But Shoaib said both were exceptions to the rule, and cited the recent blocking of two Asian councillors in North Lanarkshire who tried to become SNP Westminster candidates.

"There is no acknowledgement, there is no interaction with ethnic minorities. It's a huge divide.

"We knew that, apart from Tasmina, nobody else was going to succeed in the SNP. I told everybody long before the process started they wanted coconut Pakistanis, they don't want pure Pakistanis."

Asked if there was tokenism in the SNP, he said: "Yes. It's very very clear. She [Ahmed Sheikh] succeeded because she formed a very close relationship with Alex Salmond, otherwise she couldn't have succeeded.

"I think people are biased against ethnic minorities. I was in Labour 19 years. I did not face that sort of reception. I realised when I started phoning people [for the Glasgow Central selection] and five times they asked your name. You know, 'What is your name? Muhammad Shoaib. Is that your name? Yes, that's my name'. I felt gutted and after two days of phoning I stopped.

"In the leadership there's no racism, no bias. But on the grassroots level there is a problem."

However he said the flood of new SNP members should change attitudes for the better.

"I think in one or two years' time things will be a lot better than they are now."

Responding for the SNP, Yousaf said: ""These comments from Muhammad Shoaib are utterly outrageous. It is nothing short of racism to call Tasmina a 'coconut' simply because she has one white parent and one Asian parent. To then say she is not 'pure Pakistani' is beyond the pale.

"Jim Murphy must take disciplinary action immediately. These kind of comments have no place in our political discourse. Everyone who has any involvement with the SNP knows it to be an entirely inclusive and welcoming party, where people are selected as candidates on the basis of their ability, regardless of their background.

"Muhammad Shoaib has returned to the Labour Party, having failed to be selected as an SNP candidate through an open and upfront process - sadly, his sour grapes know no bounds."

A Labour spokesman said: "Mr Shoaib is reflecting his own experience of trying to win selection as an SNP candidate. He also maintains that his experience is not unique amongst other Black and Ethnic Minority members of the SNP."