Alex Salmond said he was confident groups such as Britain First standing at the European elections would receive "miniscule" support on polling day next Thursday.
He also warned against a vote for UKIP whose anti- immigration policy was, he said, at odds with Scotland's needs.
Mr Salmond heard how activists posing as military personnel entered the Central Mosque in Glasgow and handed out Bibles.
The First Minister said he was aware of the incident and a similar one in Cumbernauld. He said: "The mosque was effectively invaded as part of the election campaign. I can draw the concerns of the community to the attention of the Chief Constable."
He said the incidents would be treated with "great seriousness"
Mr Salmond was told that there were concerns there could have been a more serious incident and of fears that younger members could have reacted had there not been elders on hand to deal with the situation.
The First Minister said he understood the same group was fielding candidates in the election.
When asked if he had a message for anyone considering voting for these groups, he said: "Don't do it.
"Next week we will see what's what and who the Scottish people support and we will see just how miniscule their support is."
He urged people to reject Nigel Farage's UKIP branding them "nasty and intolerant" and instead asked people to show support for a diverse and multi-cultural Scotland.
Mr Salmond added: "Our diversity is our great strength and there is no better example of that than the Scots Asian community which has thrived in Scotland and helped to shape our country for the better.
"The anti-immigrant message being peddled by UKIP is one that leaves people in Scotland feeling deeply uncomfortable.
"We pride ourselves on being a welcoming, tolerant country and UKIP's brand of nasty intolerance has no place here."
Plea for Games help: Page 6