Rishi Sunak spent the summer trying to warn the Conservative Party that Liz Truss would trash the economy if she became U.K. prime minister. He failed to win the top job then — but is now on the hook for cleaning up her mess.

Just seven weeks after Truss traveled to meet Queen Elizabeth II to become prime minister, Sunak will meet King Charles III on Tuesday to formally replace her. It marks an extraordinary turnaround in his political fortunes, during an astonishing period that saw the death of Britain’s longest-reigning monarch and the exit of its shortest-serving prime minister.

He’s been at the forefront of much of the recent turmoil, starting with his resignation as Chancellor of the Exchequer in July. That helped precipitate Boris Johnson’s downfall but critically also damaged his standing with grassroots Tory members, who opted to put Truss into No. 10 Downing St.