Stephen Flynn elected as new SNP leader at Westminster
Stephen Flynn says he will push the impact of the cost of living and Scotland's right to choose its future
Stephen Flynn has been elected as the SNP's new Westminster leader following the resignation of Ian Blackford. 
Aberdeen South MP defeated Alison Thewliss - who is seen as being closer to First Minister Nicola Sturgeon - by 26 votes to 17 in a vote of the party's MPs.
Mr Blackford announced last week that he was standing down amid rumours that Mr Flynn was plotting to replace him.
Mr Flynn will face Rishi Sunak at Prime Minister's Questions on Wednesday. 
He has already said that he will appoint Mhairi Black as his deputy. 
Mr Flynn, 34, had initially been expected to be the only candidate to replace Mr Blackford, who was also regarded as being a close ally of Ms Sturgeon. 
But Ms Thewliss unexpectedly threw her hat in the ring after sources close to Mr Flynn were quoted in the media as saying he intended to replace much of the party's front bench team in the Commons. 
re had also been speculation that he could return Joanna Cherry - an outspoken critic of Ms Sturgeon - to a prominent role.
But she posted on social media that her position as chairwoman of the UK Parliament Human Rights Committee made a return to the SNP front bench "impossible".
Mr Flynn had been the party's business, energy and industrial strategy spokesman.
He told the BBC that he aimed to "build on the legacy" of Mr Blackford, who he described as being a "giant of the Scottish independence movement", and pledged to work closely with Ms Sturgeon.
But he said he and Ms Black could offer a "fresh approach here at Westminster that people in Scotland will certainly buy into". 
Mr Flynn added: "We have a lot to do. We have to make that positive, decisive case for Scottish independence and our democratic right to choose. 
"But also to hold the Conservative UK government's feet to the fire on the fact that we have a cost of living crisis and people in Scotland are struggling". 
Ms Sturgeon tweeted that Mr Flynn and Ms Black would make a "truly formidable team" and said she was looking forward to working with them both. 
SNP is currently the third-largest party in the House of Commons with 44 MPs. 
Mr Blackford announced last Thursday that he was stepping down after five years in the role but insisted he had not been pressured to do so despite reports that Mr Flynn had gathered enough support among the party's MPs to defeat him in a vote at the Westminster group's AGM.
He has said he will continue as the MP for Ross, Skye and Lochaber and has also accepted a new role  as a business ambassador for the SNP's independence campaign.
Many SNP MPs were said to have been angry at Mr Blackford urging them to give "absolute full support" to former chief whip Patrick Grady, who was suspended from the party and the Commons for sexual misconduct earlier this year. 
Only last month, Stephen Flynn said he had no intention of standing for the SNP group leadership when he was first linked to efforts to oust Ian Blackford. 
Having now successfully secured the post, he faces an immediate test - questioning the prime minister in the Commons on Wednesday. 
His supporters expect a robust performance in parliament and in the media but the job is much bigger than that. 
Perhaps his biggest challenge will be to manage a fractious group of MPs and tensions with party HQ and the leadership team in Edinburgh. 
Alison Thewliss is widely seen as being closer to Nicola Sturgeon than Stephen Flynn is and he may have work to do to build that relationship. 
w Westminster leader has been installed just a fortnight after the Supreme Court ruled that the Scottish government cannot hold a second independence referendum without the UK government's consent. 
Ms Sturgeon had wanted to hold a vote next October but now says she will use the next general election as a "de facto referendum". - a move that is said to have unsettled some SNP MPs.
Scottish Conservative chairman Craig Hoy said the defeat of Ms Thewliss - widely assumed to be Ms Sturgeon's preferred candidate - was a "personal humiliation" for the first minister and "lays bare the deep splits within the SNP". 
He added: "It is clear that the first minister's once-iron grip on her party is slipping. 
"This result is sure to lead to increased tensions between the SNP leaders at Westminster and Holyrood, not least over oil and gas policy, where Mr Flynn - a serial flip-flopper on this issue - is, for the moment, at odds with Ms Sturgeon." 
Ian Murray, Labour's shadow Scottish secretary, described the election of Mr Flynn as a "two finger salute to Nicola Sturgeon" by her own MPs, adding: "The fact is that this is nothing more than shuffling the deckchairs on the Titanic."
Scottish Liberal Democrat MP Christine Jardine said: "Stephen Flynn takes over a divided Westminster group obsessed with completely the wrong priorities."
Mr Flynn was born in Dundee and raised in the city and in nearby Brechin.
He studied politics at Dundee University before moving to Aberdeen - although he still travels back down the A90 to support Dundee United.
His hip gave way when he was a teenager, and he spent 17 years in "constant pain" and facing a "daily physical and mental battle" until eventually having replacement surgery in September 2020.
He was elected to Aberdeen City Council in a by-election in 2015, and served as the SNP's group leader from 2016 until he became an MP in 2019 when he took Aberdeen South from the Conservatives.
Mr Flynn's maiden speech in the Commons saw him warn Conservative members that "we will not forget, and we will not forgive this government", adding: "Scotland rejects your austerity and Scotland rejects your Brexit, just as Scotland rejected your prime minister."
He became a prominent member of the so-called Tuesday Club of male SNP MPs who regularly meet for five-a-side football, beer and curry nights. 
Mr Flynn has previously opposed imposing an windfall tax on North Sea oil and gas firms - a policy enthusiastically backed by party leader Nicola Sturgeon - over the potential impact on jobs in Aberdeen. 
He had been linked to the leadership role for some time, with newspaper reports claiming he was "on manoeuvres" to oust Mr Blackford - which he denied at the time. 
However Ms Sturgeon has insisted that the change of leadership at Westminster was "not a coup". 