STEPHEN Flynn has been elected the new leader of the SNP's Westminster group, it has been confirmed.

The Aberdeen South MP stood against Glasgow Central MP Alison Thewliss in a head to head for the leadership position and won.

Mhairi Black, MP for Paisley and Renfrewshire West, will serve as Flynn's deputy. 

READ MORE: Nicola Sturgeon 'yearned' for England travel ban, Matt Hancock says

Flynn won the backing of 26 MPs, while Thewliss picked up 17 votes, with one MP not voting in the contest. 

It comes after Skye and Lochaber MP Ian Blackford resigned from the role after five and a half years.

Flynn was elected by a majority of SNP MPs at the group’s Annual General Meeting (AGM) on Tuesday evening.

First Minister Nicola Sturgeon hailed the "formidable" team on social media.

She tweeted: "Congratulations to new @theSNP Westminster leader  @StephenFlynnSNP and deputy leader @MhairiBlack - a truly formidable team. Looking forward to working with them both."

Speaking after he was confirmed as the SNP's new Westminster leader, Flynn said it was an "honour" and complimented the "talented team of MPs".

He continued: "Under my leadership, SNP MPs will be relentlessly focused on standing up for Scotland's interests and our democratic right to decide our future in an independence referendum.

"Families across Scotland are paying a devastating price under Westminster control, with Brexit, austerity cuts and the Tory cost of living crisis hammering household budgets.

"SNP MPs will work harder than ever to hold the Tory government to account - and make the case that independence is the essential route to safety, fairness and prosperity for Scotland.

"I would like to thank Alison Thewliss and Stuart McDonald who are both hugely talented MPs and will continue to play a key role in our movement.

"I would also like to pay tribute to Ian Blackford MP and Kirsten Oswald MP, who have been a fantastic leadership team and will be welcome sources of advice as we move forward together."

READ MORE: Michelle Mone to take immediate leave of absence from House of Lords

Black added that she was "delighted" to take on the deputy role and "stand up for Scotland and make the case for independence".

She said: "Westminster is failing Scotland. With the Tories and Labour Party both wedded to Brexit, austerity cuts and democracy denial, it's clearer than ever that independence is the only way to escape the damage of Westminster control and get Scotland back on the path to prosperity."

Other MPs were quick to offer their congratulations to Flynn and Black. 

Blackford wrote: "Congratulations to @StephenFlynnSNP on being elected 
@theSNP Westminster leader. I look forward to supporting Stephen as he takes on the responsibility of taking the group forward as we work to deliver independence."

Thewliss added: "Congratulations to @StephenFlynnSNP and @MhairiBlack, and my thanks to all who have been so lovely and supportive - especially my running mate @Stuart_McDonald."

Hannah Bardell added: "A really positive and uplifting case put forward by all. 

"We have so much talent in our group and our party, look forward to working with them all in their various roles!"