Boris Johnson is desperately clinging to power after suffering an avalanche of resignations from his government that’s unprecedented in recent British political history.

Transport Secretary Grant Shapps and Business Secretary Kwasi Kwarteng were among senior figures telling Johnson on Wednesday that his time was up, as more than 40 ministers and aides followed the example set a day earlier by Chancellor of the Exchequer Rishi Sunak and Health Secretary Sajid Javid in quitting.

For much of the day, Johnson’s government was in real danger of imploding as his authority ebbed away. But following a meeting of his inner circle, Britain’s wounded prime minister went on the attack, firing Michael Gove — one of the Cabinet’s remaining big hitters — in what one official described as revenge for his attempt to remove the premier and a past act of betrayal.