Stephen Flynn will replace Ian Blackford after being elected as the new leader of the Scottish National Party at Westminster.
The Aberdeen South MP defeated Alison Thewliss for the top job at the party’s annual meeting 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.
SNP leader Nicola Sturgeon described the pair as a “formidable team”.
The contest was called after Ian Blackford’s resignation last week, with the former leader moving into a role as the SNP’s ambassador to business.
"It’s an honour to be elected to lead the SNP’s strong and talented team of MPs during such a crucial period for Scotland," Mr Flynn said on Tuesday.
“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.”
Scottish independence: 12 issues still to be addressed - in pictures
The new leader also paid tribute to Ms Thewliss, her deputy pick Stuart McDonald and the departing leadership.
Ms Black said she was “delighted to have been elected”.
“Westminster is failing Scotland," she said.
“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.”
Mr Flynn’s ascendancy to the top job comes in the weeks after reports of a coup attempt against Mr Blackford, which were eventually quashed when he tweeted that he was not seeking the position.
Elected in 2019, the former Aberdeen City councillor succeeded Ross Thomson in his seat after he declined to stand again for Parliament.
Taking to Twitter in the minutes after the result was announced, the First Minister said: “Congratulations to new SNP Westminster leader Stephen Flynn and deputy leader Mhairi Black — a truly formidable team.
“Looking forward to working with them both.”
Scotland cannot hold a second independence referendum - video
Ms Thewliss congratulated the new leadership team, saying: “Congratulations to Stephen Flynn and Mhairi Black, and my thanks to all who have been so lovely and supportive, especially my running mate Stuart McDonald.”
The Scottish Conservatives and Scottish Liberal Democrats said Mr Flynn’s victory over Ms Thewliss, reportedly the preferred candidate of Ms Sturgeon, showed that the SNP leader was losing sway in the party.