An MP who once threatened to sue Alex Salmond has been elected the SNP's new Westminster leader.

In a remarkable political turnaround, Highland politician Ian Blackford was hailed as the 'unity' candidate as he was installed in the position by other SNP MPs.

He succeeds Angus Robertson, who along with Mr Salmond was one of the SNP's most high-profile casualties of the General Election.

Read more: Nicola Sturgeon hits out at ‘in denial’ claims over impact of General Election result on second referendum

Mr Blackford is a former treasurer of the SNP who fell out with then leader Alex Salmond in 2000 amid attempts to suspend him from the office.

At the time he even threatened to sue Mr Salmond. for defamation.

The MP for Ross, Skye and Lochaber beat Joanna Cherry, the MP for Edinburgh South West, and Drew Hendry, the MP for Inverness, Nairn, Badenoch and Strathspey.

Edinburgh East MP Tommy Sheppard had earlier pulled out of the race.

He had pushed for the party to become more left-wing to challenge a resurgent Jeremy Corbyn in Scotland, warning that Labour had come a close second to the SNP in a number of seats north of the Border.

Mr Sheppard said that there was “widespread support” for many of his ideas, but that he did not have “majority support" to be named Westminster leader.

Read more: Nicola Sturgeon hits out at ‘in denial’ claims over impact of General Election result on second referendum

But there was pushback from some MPs keen for the party to win back constituencies like Mr Salmond's former seat of Gordon.

Aberdeen North MP Kirsty Blackman will act as Mr Backford's deputy.

He said it was an "honour and a privilege" to lead the SNP group during such a crucial period.

"As Scotland’s leading party at Westminster, and the third party across the UK, the SNP has a huge opportunity in this parliament to stand up for Scotland's interests," he said.

"The hung parliament means that SNP MPs will have more influence than ever before, and with crucial Brexit negotiations on the horizon it has never been more important to make Scotland's voice heard."

In 2015 Mr Blackford, then a member of the SNP’s welfare team at Westminster, faced accusations of hypocrisy after he took a £3000 donation from a Conservative hedge fund boss while hitting out at “callous Tories” over their social security cuts.

Read more: Nicola Sturgeon hits out at ‘in denial’ claims over impact of General Election result on second referendum

SNP leader Nicola Sturgeon said Mr Blackford had formidable professional and political experience and "has played a key role in the last two years as part of the effective opposition to the Tory government.

"Ian has led our work opposing Tory benefit cuts, and supporting the WASPI women - supporting vulnerable people across the country in the face of callous Tory policies.

"Our immediate priority is to work with others in the House of Commons to put a halt to Theresa May’s Hard Brexit and her austerity programme – both of which have been rejected by the electorate. There can be no business-as-usual approach.

"The Tories must now listen to voters, reach out to all parties and devolved governments, and set a new course - ending austerity and building a cross-party, all-government approach to Brexit that will protect the interests of all four UK nations.”