The media has a duty not to "stoke the fires on misinformation" when it comes to the refugee crisis, Europe minister Alasdair Allan has said.

Mr Allan added that a "populist agenda" had infected the European Union (EU) referendum campaign, leading some voters to view it as "referendum on refugees".

READ MORE: Nicola Sturgeon tells of fears Brexit vote has fuelled racism

The minister was speaking at a Festival of Politics event at the Scottish Parliament, discussing Scottish solutions to the refugee crisis which has engulfed Europe.

Scotland will take about 2,000 of the 20,000 refugees David Cameron previously agreed to allow into the UK.

Asked about negative public attitudes to the migrant crisis, Mr Allan said: "Merely preaching at people doesn't always help, but nonetheless I think it is important that all of us as politicians and all of us in public life ask where it is that some of these views come from.

"I have people in my constituency (Western Isles), where there are two refugee families, emailing me telling that Sharia law is about to be introduced in their community.

"I have pressed them as to where this idea comes from, and it comes from a newspaper, it comes from the press.

"All of us in public life, all of us in the press, have a duty not to stoke the fires of misinformation."

He added: "A populist agenda did infect the EU campaign.

"It did become, for many, a referendum on refugees, on foreign people in general, and that is something we have to challenge at every turn if we are going to have a rational debate."

READ MORE: Nicola Sturgeon tells of fears Brexit vote has fuelled racism

Labour MSP Iain Gray, who was also on the event panel, said: "In East Lothian we have seven families coming and there have been many things done to welcome them ... but I would be lying if I was to pretend that I haven't had emails similar to Alasdair's.

"The answer to that cannot be to accept that. It is incumbent on us to try to change attitudes."

The event, chaired by former Holyrood presiding officer Sir George Reid, became heated at times as audience members offered contributions to the debate.

John Robertson claimed there was a "Muslim invasion" hitting Europe while another man claimed Angela Merkel had "destabilised" the continent.

READ MORE: Nicola Sturgeon tells of fears Brexit vote has fuelled racism

Laura Ross, who spent several weeks working with refugees in Greece, said children were in need of help from the EU.

"They need safety, they need to come to a safe country now, because the Greek police are not protecting them," she said.

The audience also heard from refugees who have already settled in Scotland but have been unable to work in employment which makes full use of their skills.

Debora Kayembe was working as a lawyer investigating genocide in the Democratic Republic of Congo when she was forced to flee, seeking political asylum in the UK, while Mohammed Hussain worked as an engineer with the British Army in Afghanistan before seeking safety in Glasgow.