KEVIN MCCARTHY’S stunning decision to drop out of the race to be Speaker of the House of Representatives on October 8th has been hailed by his Republican colleagues as a selfless act. It was more obviously one of self-preservation. The current House majority leader had been considered a strong favourite for the job. He was about to be confirmed as the nominee of his party, which has a big majority in the House, only moments before he withdrew. There was such little support for the other two contenders, Daniel Webster and Jason Chaffetz, respectively from Florida and Utah, that the contest was immediately postponed.

Mr McCarthy also wanted the job so badly that he was willing to trash the outgoing speaker, his friend and supporter John Boehner, in an effort to mollify the ultra-right-wing fringe who had forced him to resign last month. Asked to appraise Mr Boehner’s five-year tenure as Speaker, which has been sullied by endless rows with obstructive right-wing Republicans, for whom any form of compromise with President Barack Obama is ignominious, Mr McCarthy marked it an unimpressive B minus. Much good that act of betrayal did him.

Mr McCarthy, an amiable representative from California, resigned after it became clear that, even if he won the nomination, he could not count on the support of those same 40-odd right-wing wreckers—members of a faction related to the Tea Party, called the Freedom Caucus. That would have left him facing humiliation: as the candidate of the majority party, but short of the 218 votes needed to be approved by the House.

In a statement following his withdrawal, Mr McCarthy, flanked by his wife and daughter (who were presumably present to celebrate his nomination), said: “I just think it is best to have a new face.” Yet it is hard to think what the optimal Republican candidate for Speaker might look like.

Most Republican Congressmen are in the Boehner-McCarthy mould: devout Reaganites, who talk of slimming the state, but are mostly respectful of its functions and institutions. Thus, Mr Boehner’s willingness, after long and dreadful provocation from the right, to offer his scalp as a means to prevent the budget crisis that members of the Freedom Caucus were angling for last month.

They objected to public funding of an organisation that carries out abortions, Planned Parenthood, and were prepared to block Mr Boehner’s efforts to extend the current budget unless that funding was cut. Had Mr Boehner been unable to recruit alternative support from House Democrats—which his resignation made easier—the showdown would have led to a government shutdown that members of the Freedom Caucus appeared almost to welcome.

Elected on a wave of anti-government feeling, these diehards have what amounts to a mandate for anarchy. First, they issue unrealistic and uncompromising demands of their party’s leaders, which play well in their constituencies, where Republican pragmatists such as Mr Boehner are hate figures. Then, they present the institutional chaos that results as further evidence of the broken system they themselves diagnosed. Heads they win, tails American democracy loses.

Mr Boehner worked hard to unite these incompatible parts: thus, for example, his own willingness to pander to the Tea Party types by letting them force a government shutdown in 2013 that lasted nearly three weeks. So did Mr McCarthy. Besides insulting Mr Boehner, he listened patiently to their demands for, among much else, more places on congressional committees and more air-time in the House than their numbers warrant. Yet this so irritated mainstream Republicans, who have long been angered by the reputational damage the Freedom Caucus is causing their party, that he would have struggled to deliver these perks even if he had wanted to.

Perhaps the only unifying aspect of Mr McCarthy’s candidacy was an embarrassing blunder on Fox News, in which he suggested that the House committee investigating the 2012 Islamist attack on an American compound in Benghazi was intended to damage Hillary Clinton’s presidential ambitions. All Mr McCarthy’s Republican colleagues were embarrassed by that.

In the light of his withdrawal, there is likely to be a hardening of both rival camps’ positions. Freedom Caucus members believe they have won a second victory against their party’s reviled leadership in little under a fortnight, and now are liable to demand even more for their support. Mainstream Republicans will find that intolerable.

A solution is hard to envisage. For now, Mr Boehner will remain in post until some sort of a unifying candidate can be found. “As I have said previously, I will serve as Speaker until the House votes to select a new Speaker,” he said wearily.

But that could take a while, at a time when Congress has bigger things to worry about. Unless it can agree, by November 5th, to raise the government’s debt ceiling, America will default on its debt. Unless it can negotiate a fresh budget, by December 11th, the federal government will shut down. These weighty tasks of state, affecting the lives of millions of Americans, may also fall prey to the machinations of 40 grandstanding Republicans.