Stephen Flynn has been named as the new leader of the Scottish National Party in Westminster, replacing Ian Blackford.

The MP for Aberdeen South defeated Alison Thewliss for the top job at the SNP’s AGM on Tuesday and will face Rishi Sunak at Prime Minister’s Questions less than 24 hours later.

Mr Flynn’s deputy will be Paisley and Renfrewshire South MP Mhairi Black – who takes over from Kirsten Oswald.

Following the announcement, Mr Flynn said in a statement: “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.”

Ms Black MP added: “Westminster is failing Scotland.

More on Snp

“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.”

SNP leader Nicola Sturgeon congratulated the “formidable team” elected to lead her party at Westminster.

In a tweet minutes after the result was announced, the first minister wrote: “Congratulations to new @theSNP Westminster leader @StephenFlynnSNP and deputy leader @MhairiBlack – a truly formidable team.

“Looking forward to working with them both.”

Mr Flynn replaces Ian Blackford who held the role for over five years, but announced his exit last week.

Mr Blackford, who will remain an MP and take on a new role at the centre of the SNP’s independence campaign, said it was “the right time for fresh leadership at Westminster as we head towards a general election and the next steps in winning Scotland’s independence”.

However, SNP sources told Sky News the move was “a long time coming” amid reports of a coup against him – rumours rejected by Ms Sturgeon.

Questioned after his resignation, Mr Blackford avoided directly answering whether he had been pushed out.

Instead he said Ms Sturgeon had asked him to be her business ambassador and said the fight for Scottish independence is “moving into a new phase”.