“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,” Flynn said in a statement.
“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.”
Scottish Conservative chairman Craig Hoy said the defeat of Thewliss 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 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 MP said: "Stephen Flynn takes over a divided Westminster group obsessed with completely the wrong priorities."
Have your say in our news democracy. Click the upvote icon at the top of the page to help raise this article through the indy100 rankings.