First Minister Nicola Sturgeon said the Spanish government cannot ignore the "very significant expression of support for independence" in Catalonia.

Sturgeon also said a "dialogue" between the two sides was now needed as she condemned the violence that took place during Sunday's unofficial referendum.

While the First Minister stopped short of suggesting an agreement on another ballot, she said "in any democracy there has to be surely a legal way for people to express their view".

Hundreds of people were injured when police tried to stop voting in the poll, which was deemed illegal by the Madrid government and the country's top court but was backed by the Catalan regional authorities.

Catalan officials said 90% of the 2.26 million people who took part in the vote backed independence.

The region has 5.3 million registered voters.

Speaking during a visit to Aberdeen on Monday, Sturgeon said: "I think dialogue now has to replace the kind of confrontation we have seen.

"Not withstanding the many hurdles the referendum process faced and the scenes we saw yesterday, the overwhelming majority of people who did vote yesterday voted for independence.

"Spain is of the view and will maintain the view that that vote was not in line with its constitution and therefore isn't legitimate."

The First Minister said the strength of feeling simply cannot be ignored.

She added: "I hope now that there is a process, a dialogue, that will allow both the Spanish and Catalonian governments to find a way forward that respects the rule of law, respects democracy but also respects the right of the people of Catalonia to decide the future of their country."

Asked if she thought there should be an agreement on holding a legal referendum, Ms Sturgeon added: "That's not for me to say.

"I think in any democracy there has to be surely a legal way for people to express their view and therefore there should be a process of dialogue that allows Catalonia and the Spanish Government to decide the way forward here.

"We saw yesterday a very significant expression of support for independence for Catalonia and that can't simply be cast aside."

The First Minister also repeated her criticism of the response from the UK Government, which she described as "shamefully weak" over the weekend.

The Foreign Office said the referendum was "a matter for the Spanish government and people".

Sturgeon said: "I think all democrats watching those scenes yesterday would have been horrified and I thought the statement from the Foreign Office should have been stronger in saying that kind of behaviour was not acceptable.

"A real friend to Spain, and I count Scotland as a friend to Spain, I think should say that that kind of behaviour doesn't do the reputation of Spain any good."