An SNP campaigner who trolled Charles Kennedy with vile Twitter messages in the weeks before his death has been forced to quit.

Brian Smith mocked the former Lib Dem leader’s battle with alcoholism – at one point calling him a ‘drunken slob’.

He was forced to stand down today as it emerged he was close friends with Ian Blackford – the SNP MP who ousted Mr Kennedy in last month’s General Election.

Scroll down for video

SNP campaigner Brian Smith (left) mocked former Lib Dem leader Charles Kennedy's (right) battle with alcoholism – calling him a ‘drunken slob’. He has now quit as it emerged he was friends with Ian Blackford

The former policeman lives less than a mile from Mr Blackford and worked as a ‘convenor’ in his local SNP campaign office.

However, the newly elected MP failed to raise the alarm about Smith’s hostile messages, even though the abuse was conducted under his nose.

The revelations heap further pressure on the SNP, which has already faced criticism over trolling by other supporters during the final weeks of Mr Kennedy’s life.

Smith is believed to have posted more than 130 messages on Twitter alone, starting his online campaign as far back as 2014.

His abuse was so prolific in the run-up to the election that Mr Kennedy’s campaign team was forced to employ staff to monitor his own Facebook page.

When he was eventually blocked from the social media site, Smith used other platforms to berate the politician.

In a series of unsavoury comments, Smith referred to Mr Kennedy as a ‘drunken slob’ only moments after he lost the Ross, Skye and Lochaber seat he had held since 1983.

He also suggested the MP’s Westminster voting record was tainted by his ‘problem’. It later emerged Mr Kennedy had spent more time in his constituency following the deaths of his parents.

Mr Blackwood, a wealthy former banker from Edinburgh, owns a large property near Smith’s home on the Isle of Skye. The pair and their wives are ‘friends’ on Facebook.

The body of Mr Kennedy, 55, was found by his partner at his home in Fort William earlier this month. Mr Blackford later led tributes in Parliament.

A leading Scottish Liberal Democrat said they were ‘stunned by the hypocrisy’.

However, Mr Blackford claimed he had never seen any of the messages.

Smith has refused to comment on the online remarks, but insisted he had not acted with Mr Blackford’s approval.

The SNP said Smith accepted his comments were ‘entirely inappropriate’.

Former Labour Energy Minister Brian Wilson (left) has claimed that Charles Kennedy (right) was taunted by realms of online abuse from SNP loyalists prior to his death. Mr Kennedy passed away at home ten days ago

This is just one example of the torrent of abuse Mr Kennedy received on Twitter and Facebook prior to his death. Other posts branded him a 'drunken slob', 'disgraceful', 'a nasty, bitter man' and a 'diminished figure'

It came as former Labour Energy Minister Brian Wilson revealed that Mr Kennedy was taunted by SNP loyalists to such an extent that he had to hire a full-time employee to monitor the online abuse.

Mr Wilson said the ex-MP sought advice from him before his death over dealing with the trolling and other abuse – which included finding the contents of his rubbish bins strewn over his driveway after his defeat.

Mr Wilson, who was MP for Cunninghame North from 1987 until 2005, singled out some members of the Skye and Lochalsh branch of the SNP as the worst offenders.

He said that when Mr Kennedy appealed for supporters to put up a poster in their windows, one social media user, with more than 20,000 followers, sneered: 'Just put an empty whisky bottle in your window. It's the same thing.'

Others, as part of a movement known colloquially as 'Cybernats', directed messages to Mr Kennedy online describing him as everything from 'disgraceful', 'despicable' and a 'nasty, bitter man' to 'a sore loser' and a 'sad, diminished figure'.

One SNP supporter, called Paul Smythe, even called Mr Kennedy a 'drunken embarrassment'.

He wrote online: ‘I will give you a thought tomorrow when you are where you belong, retired and not a drunken embarrassment any more.’

Another, called Donald P. Maclean - whose Twitter profile carried an SNP logo - dubbed him a 'drunken alcoholic a***hole', while a man called Mark Rooney called him an 'alkie c***'.

On a Facebook chatroom for SNP supporters in Skye, a woman called Elaine Whiteman said he should 'get back in the pub'.

Mr Kennedy was said to have spent much of his time, since polling day, with his ten-year-old son, Donald, by his former wife Sarah, from whom he separated in 2010. He took the online abuse on the chin, friends said

David Baldwin called him a 'useless mess' and, on Mr Kennedy's own Facebook page, a William Paterson said he was 'pished'. Meanwhile, Terry McAulay said he'd been 'on the drinky poos again'.

The posts were just a handful of hundreds of similar abusive messages in which SNP supporters sought to exploit Mr Kennedy's drink problem.

Mr Wilson, a former Government minister, blasted the Twitter trolls who bombarded the late MP with abusive messages and said 'lessons should be learned'.

He said: 'He was not alone.

'A member of Charles's constituency staff worked full time on deleting abuse from his own social media sites. Any attempt to communicate on behalf of his own campaign met with another torrent of well-orchestrated poison.

'The lessons to be learned should certainly involve the treatment meted out to him (Mr Kennedy) in the months prior to his death for this is now integral to the nature of Scottish politics.'

Charles Kennedy was the victim of extensive personal attacks from SNP loyalists, it has emerged

His comments come on the eve of the funeral of the former Lib Dem leader, who will be buried following a memorial service at St John's Church in Caol, near his Fort William home.

Mr Wilson said there was no evidence that the abuse led directly to his death.

Writing in his weekly column in the West Highland Free Press, which covers Mr Kennedy's old constituency, he said: 'There is no evidence that the campaign he was subjected had any direct relationship with his death.

'Nor did it contribute significantly to his defeat which would have happened anyway, though the perpetrators were not to know that at the time.'

But he added: 'It may be that Charles Kennedy was subjected to particularly vicious treatment, not just by the 'online community' but also in the streets and even in his election office in Fort William.

'He contacted me a couple of times to ask for advice about whether he should 'go public' about some of the aspects of what he was being subjected to. But by then there was no point.

'Like any decent politician he was bemused and upset by the tactics used against him.'

Mr Wilson said other examples of such abuse could now be found in 'every constituency in Scotland.'

He added: 'The irony is that none of it was necessary even for the SNP's own purposes. The SNP are now in a position of great strength. What I find much more troubling is the way the well of Scottish politics is being poisoned by intolerance.

'It may finally occur to Nicola Sturgeon and her high commend that they no longer need the outriders whose appointed role is to threaten, denigrate and abuse anyone who stands in their way.

'It would be a fitting act of respect to Charles Kennedy and the civilised politics he represented if his chief tormentors were now called to account.'

Mr Kennedy's funeral Mass will be led by Father Roddy McAuley, who has described the ex-MP as 'a much loved and respected parishioner'.

There is also to be a memorial service at the University of Glasgow on June 18, and another in London at a later date.

Mr Kennedy, 55, was found dead by his partner Carole MacDonald at his cottage near Fort William (pictured)

Mr Kennedy died suddenly a week ago at the age of 55 after suffering a major haemorrhage as a result of a long battle with alcoholism.

In a statement, his family said: 'This will be an opportunity for Charles' family and friends, the local community he loved and served for so long, as well as his political friends to bid him a fond farewell.

'The police have informed us to expect large numbers of people and we will make arrangements for the service to be piped outside should the church be full to overflowing.'

Mr Kennedy's body will be buried at Clunes, Achnacarry.

His family added: 'We would like once again to thank the various authorities who have helped us through this difficult time.

'We have been touched by the care and sensitivity shown to us by the police, ambulance personnel, the office of the procurator fiscal, the registrar and Mike McFall, funeral director.