The First Minister has spoken of the shock she felt at the murder of MP Jo Cox at an event celebrating her legacy.

Nicola Sturgeon urged people not to allow violence to divide communities and asked them to focus on unity during a speech at Glasgow Women's Library.

It was one of more than 100,000 events taking place across the UK for the Great Get Together, organised by Mrs Cox's husband Brendan on the weekend of the anniversary of her death.

Thomas Mair shouted "Britain first" when he shot and stabbed the 41-year-old mother-of-two in her constituency on June 16 last year during the EU referendum campaign.

He was later handed a whole-life prison sentence for her murder.

At the tea party on Saturday, Ms Sturgeon said: "I remember vividly as everybody does the sheer sense of shock a year ago when the news came through that an MP had been attacked, then a bit later on the dreadful news that she had been murdered.

"That shock was personal for politicians but it was profound I think for all of us because it was a horrible, violent act, like so much else that happens in the world, and made us focus on the things that divide people rather than the things that bring us together.

"So Brendan Cox, Jo's husband, and the Jo Cox Foundation have to their great credit been really focused on trying to celebrate Jo's memory by getting people to focus on what unites us, not what divides us.

"Jo's maiden speech in the House of Commons had that memorable phrase 'we have more in common than anything that divides us', so that's a pretty good principle for all of us to try and live our lives by."

She continued: "We live in a world where a tiny minority of extremists try to divide us through acts of unspeakable violence and we've got such a responsibility not to allow them to do that.

"Isn't it interesting actually, the person that murdered Jo Cox - who shouted political slogans as he murdered her - isn't seen or held up as somehow representing a bigger community and yet people who commit those kinds of acts, telling us that they are doing it in the name of Islam, we allow them sometimes to get away with demonising a whole community. So we shouldn't allow the minority who commit these acts to do that."

Ms Sturgeon asked people to try to do good and leave the world a better place, adding: "If that is what can come out of that horrific murder a year ago, that robbed two little children of their mum, then Jo Cox's impact on this world will be way, way beyond anything she would have imagined it would be."