After 24 hours of political turmoil, Austria's ruling People's Party has chosen Interior Minister Karl Nehammer to take over as leader of both party and country.
Mr Nehammer will be the party's third choice of chancellor in weeks, after Sebastian Kurz stood down in October.
Mr Kurz is under investigation after he was implicated in a corruption scandal.
On Thursday he stepped down as party leader, prompting his replacement as chancellor to say he would resign too.
Alexander Schallenberg said he was convinced the country should be run by the same person as the ruling party leader. The People's Party (ÖVP) is in coalition with the Greens, who withdrew their support for Mr Kurz when prosecutors said they were investigating him.
Mr Nehammer told reporters it was a great honour and privilege: "Today I was unanimously appointed by the ÖVP leadership as party head and at the same time as candidate for federal chancellor."
The Greens will not stand in his way, so he will become chancellor as soon as his swearing-in ceremony is agreed with President Alexander Van der Bellen.
He said the government needed to "state clearly what is necessary when it concerns the question of asylum and migration, when it comes to security for the Austrian people".
In all there were three party resignations on Thursday, as Finance Minister Gernot Blümel also stood down, so Mr Nehammer had the immediate task of reshuffling the cabinet too.
The change at the top marks an end to the whirlwind career of Sebastian Kurz, who was just 31 when he became Austrian chancellor in 2017.
His first coalition collapsed in May 2019 when the far-right Freedom Party became embroiled in a political scandal dubbed Ibiza-gate which involved a secret video.
His position became untenable in October 2021 when anti-corruption prosecutors began investigating allegations that his entourage had previously used public funds for "partially manipulated opinion polls". He denied wrongdoing but the Greens said he was no longer fit for office and demanded he step down.
Mr Schallenberg will become foreign minister again as part of the shake-up.