ACCORDING to those who inhabit it, the House of Representatives is the most demotic bit of the federal government. Kevin McCarthy, the Republican who was recently elected as the House majority leader, once likened it to a truck stop. One of the first things Mr McCarthy announced after winning was that he would carry on sleeping in his office, something several congressman wishing to appear frugal claim to do (they shower in the gym, in case you were wondering).

On one measure, though, the House looks positively aristocratic. Since 2012, when its members were last up for election, 30% of Europe’s monarchies have put newcomers on the throne. By contrast, only around 17 out of 435 House seats—less than 4%—will be competitive in November’s mid-terms. Even if one includes members who are retiring, resigning or have lost primaries, the House doesn’t come close to matching the turnover rate of royals in the Old World (see chart 1).

Why are incumbents so hard to dislodge? After the Democrats won more votes than Republicans in the 2012 House elections but ended up with 33 fewer seats, many blamed gerrymandering (the practice of drawing electoral maps in a way that favours one party). This cannot be the whole explanation, however. Granted, cheap, powerful computing has brought a new level of precision to redistricting, but there has also been resistance from voters fed up with having congressmen choose their electorates rather than vice versa. California and Florida passed constitutional amendments to curb partisan gerrymandering in 2010. On July 10th a judge in Florida ruled that the GOP’s creative cartography there had broken the law.

Some of the most egregious gerrymanders—North Carolina’s worm-shaped 12th district and Illinois’s earmuff-shaped fourth district come to mind—were drawn over 20 years ago to increase the number of ethnic minorities in Congress, rather than for partisan advantage (though the two often overlap). Both parties gerrymander when they get the chance, but political scientists have downplayed the importance of redistricting in recent elections, pointing out instead that Democrats waste many more votes in the course of electing their representatives, while the Republican vote is more efficient.

If gerrymandering is not the main reason for the lack of competition in the House, what is? One idea is that voters have sorted themselves into neat blocks of red and blue, a notion popularised by Bill Bishop, author of “The Big Sort”. There is plenty of evidence for this. A survey by the Pew Research Centre found that three-quarters of people who described themselves as consistent conservatives would prefer to live in a place where the houses are bigger even if schools, shops and restaurants are several miles away. Three-quarters of consistent liberals preferred to live in smaller houses where they could walk around the corner to buy tofu.

Yet this idea does not convince everyone. Bill Frey of the Brookings Institution, a think-tank, points out that most people’s choice of where to live is based on things like the quality of schools or the cost of housing. Also, the number of dedicated partisans on either side is fairly small and unchanging: most Americans hold opinions that are more purple than pure red or blue. Unfortunately the moderates are more likely to stay at home on election day than partisans on either side. In the 2010 mid-terms only 41% of eligible voters found their way to a polling booth, making the country look more divided than it is.

If the evidence for voters sorting themselves into ideological blocs is equivocal, the evidence that the parties have done something similar is solid. It has taken a long time for the realignment of the parties brought about by civil-rights laws in the 1960s and the rise of the conservative movement in the 1970s to work through the system, but the process is almost complete. Every two years a few more split districts—those that vote for one party in congressional elections and another in presidential polls—turn monochrome. They are now nearly extinct (see chart 2).

The top targets for the Republicans this time around are districts like Minnesota’s seventh and West Virginia’s third, which are both split districts. The incumbents, Collin Peterson in Minnesota and Nick Rahall in West Virginia, are more conservative than the average Democrat: both men receive A-ratings from the National Rifle Association, for example. If they go, their party’s caucus in the House will become even more homogenous than it already is.

The replacement of heterodox congressmen with identikit Republicans and Democrats has been so gradual that it is hard to identify a single turning-point. But numbers from the Cook Political Report, which rates each district by the ideological leanings of its likely voters, suggest that the number of swing seats dropped rapidly between 1998 and 2002 (see chart 2, again).

Gerrymandering after the 2000 census may have had something to do with this, but a more obvious cause was the intense partisan warfare of those four years, during which the House voted to impeach Bill Clinton and the Supreme Court voted to make George W. Bush president. Such bitter controversies widened the divide between the two parties. Under the elder George Bush’s presidency, House members voted with their own party about three-quarters of the time. During his son’s time in office that figure increased to 90%. House voting patterns are just as monolithic under Barack Obama.

All this has unpleasant consequences for the way the federal government works. Even small things, like finding money to refill the Highway Trust Fund, which pays to repair roads, are hard. Bigger things, like balancing the budget, seem impossible. When Mr Clinton backed a welfare reform devised by Republicans in 1996, 30 House Democrats, most of them from somewhat conservative places, initially supported him. Now only nine of those districts are represented by Democrats. A president who wanted to repeat Mr Clinton’s bipartisan strategy would struggle to do so.

Though the level of party loyalty in the House is often described as unprecedented, that is not really true. Something similar existed around the turn of the 20th century. The difference is that then the Republican Party held both arms of Congress and the presidency, so government hummed along without much interruption. Until one of the parties manages to repeat this trick the federal government will often fail to discharge what seemed until recently to be basic functions.