SNP MP Joanna Cherry has had police protection to attend her weekly surgery after receiving a barrage of “very unpleasant and upsetting” online abuse, including what was regarded as a death threat.

Two officers from Police Scotland attended her Edinburgh South West constituency surgery on Friday after the abuse, which included the posting of a cartoon with a gun and the words “Do it.” The fact that the message was posted alongside details of Ms Cherry’s weekly surgery caused alarm and led to the police presence.

Almost two years ago, the Labour MP Jo Cox was murdered after being shot and stabbed several times in her West Yorkshire constituency. In 2010, Labour MP Stephen Timms was stabbed twice in the stomach during his weekly surgery.

Read more: SNP declares war on cybernats

The abuse on social media directed at Ms Cherry followed an evidence session of the Joint Committee on Human Rights[JCHR] at Westminster as it undertook an investigation into democracy and freedom of speech. During the session the SNP MP questioned representatives from Facebook and Twitter about the abuse of women MPs and women more generally on social media.

This later led to what Ms Cherry’s office described as a “large number of unpleasant tweets”. But one particularly caused alarm, which was different from the others and could have been regarded as a direct threat to the MP’s health and safety and confirmed her whereabouts at a certain time and place.

Advice was sought from the Metropolitan Police and Police Scotland, which subsequently interviewed Ms Cherry’s constituency staff and provided the protection from two uniformed officers “as a precaution”.

Her office also pointed out how research by Amnesty International in 2017 found the backbencher, who is her party’s home affairs spokeswoman, was the second most abused MP during that year.

Ms Cherry told The Herald that during the JCHR session she questioned a representative from Twitter about its policy towards online abuse of women and free speech, who accepted there were shortcomings.

“As a result, I have received a barrage of offensive abusive tweets and emails, some of which were very threatening. In response, my office contacted Police Scotland, who advised that I should have a police escort at my constituency surgery on Friday.

“This has been very unpleasant and upsetting for me and my staff. However, I am determined not to be intimidated and to continue to discharge my duties as a constituency MP and in Parliament.”

Read more: Marianne Taylor: Cybernats and extremists represent the worst of times

She added: “I am very grateful for the huge number of supportive letters, emails and tweets I have received from constituents, ordinary SNP members and indeed people from across the UK and abroad."

Earlier this year, the Metropolitan Police had to increase security at Westminster after MPs regularly ran a gauntlet of abuse linked to the debate over Brexit.

John Bercow, the Commons Speaker, described the abuse and harassment of MPs outside the House of Commons as "a type of fascism," which was “intolerable”.

Yesterday, Angus Robertson, the former deputy leader of the SNP, called for a “cultural change” in the use of the Internet from both sides of the constitutional argument in Scotland.

“People can’t go on thinking they can sit in front of their keyboards and do nothing but send abuse to people they don’t agree with. You wouldn’t do it in public, you’d be thrown out of a pub for doing it, you’d never do it at a family event, why on earth would you do it online?" he said.