A woman who linked racism with Scottish nationalism has quit Twitter amid fears for her safety.

Claire Heuchan, a black Scottish PhD student who wrote a supportive article after the London mayor Sadiq Khan's race row comments, believes critics were trying to discover her home address.

Her piece supported claims at the weekend by Sadiq Khan that there were parallels between Scottish nationalism and racist movements.

Ms Heuchan, who studies at Stirling University, said she was subjected to heavy criticism, but also received substantial support, after writing a Guardian opinion piece related to the claims by Mr Khan, the newspaper reported.

The abuse was said to have included a racist comment left on her personal blog.

Attacks included a comment on her blog calling her an African who had no right to discuss ethnic white Scottish affairs, were accompanied by calls on Twitter for the University of Stirling to sack her although she is not employed there. Others disputed that she was Scottish.

She was reported to have said: "When I saw people were trying to work out my location, became physically terrified. I started shaking and crying. I don’t feel safe.”

In her Guardian article, Heuchan said: “Equating racism with Scottish nationalism is a massive false equivalence, yet both perspectives are reliant on a clear distinction being made between those who belong and those who are rejected on the basis of difference.”

Labour mayor Mr Khan said in article that there is “no difference” between independence supporters and those who try to “divide us on the basis of our background, race or religion”.

Professor Karen Boyle, head of gender studies at Stirling and Heuchan’s PhD supervisor, said the university had “absolutely no hesitation in condemning any threats to Claire, in the strongest possible terms”.