IF NOBODY else, at least Kim Jong Il, North Korea's leader, appears to have found something to fill his belly with during the annual Chuseok harvest festival in North Korea this week. “His face beaming with a smile,” as his propaganda machine put it, he dropped into a shop in Pyongyang selling pancakes stuffed with meat.

Outside the capital there are few such treats. Much of the rest of the country is suffering a severe food shortage, say aid agencies. On September 9th the UN's World Food Programme released video images from a trip to the North Korean countryside showing listless orphans, their growth stunted by malnourishment. A cold start to the growing season and summer flooding has badly damaged rice and maize crops. Potato rations have been cut by a third, to two a person each day.

Mr Kim's regime, with customary cynicism, has told people to “simplify” their dining habits at Chuseok this year “in the socialist way,” according to DailyNK, a Seoul-based online news agency. Yet in his parallel universe, Mr Kim boasted of the variety of beef, pork, goose and turkey available to the privileged customers of the pancake shop. How does he get away with it? Loosely, that is the question posed by North Korea-watchers trying to understand how an odious regime has remained stable for so long, defying frequent predictions of its downfall.

North Korea should, by rights, be tottering under the weight of its spectacular economic mismanagement. It is in the midst of a shaky succession process, which is hard for any totalitarian regime, let alone one where the chubby heir-apparent, Mr Kim's son, Kim Jong Un, is little known or loved. The country's food crisis has its roots in atrocious farm productivity, the high international price of grain, and an embargo on much food aid because of North Korean belligerence towards South Korea in recent years. Although the public-distribution system for food has collapsed in much of the country, the regime has tried, albeit imperfectly, to stamp out informal markets, the only succour for many.

North Korea has an economic lifeline to China, but scholars who have interviewed North Korean refugees report contempt, tinged with envy, for their giant neighbour. The North was once able to use promises to scrap its nuclear-weapon programmes as a means to extort hard currency from South Korea, America and Japan. No more.

The Kim family brand of extreme, race-based nationalism has support in parts of the capital, Pyongyang, with its goose-stepping parades and bombastic high-rises. This, after all, is where the elites live, enjoying perks and protected by an overwhelming security apparatus. Elsewhere in the country, the regime sees enemies. With totalitarian obsession, it groups North Koreans into 51 social categories, graded by loyalty to the regime. Of those groups, 29 are considered to make up an underclass that is hostile or at best ambivalent towards the regime. Most of these suspects live not in Pyongyang or even in lesser cities, but in the countryside.

Some people brave harassment and shooting to cross the border into China to earn hard currency (many North Koreans, especially black-market traders, cross and recross into China). Some children in the North live ferally: they are known as kotjebi, or “fluttering swallows”, and roam in packs. When they cannot steal in the markets, they eat dead dogs and rotten food (reportedly chewing toothpaste in the belief that it prevents food poisoning). Many people, particularly women, live dangerously off the black markets, which have flourished again after an unsuccessful attempt to crack down on trade in hard currency. Most endure hunger at least some of the time. So why do they not revolt?

One intriguing explanation comes from Go Myong-hyun, a statistician at the Asan Institute for Policy Studies, which has just held a conference in Seoul on the viability of the North Korean regime. On the basis of satellite imagery of crop areas, vegetation and human settlement, Mr Go believes that both North Korea's crops and the population that tends them are more geographically scattered than outsiders have hitherto thought. He contests UN estimates that over three-fifths of the country is urbanised. That would require every farmer to sustain nearly two city dwellers, which a shortage of fertiliser, farm machinery and fuel precludes. Mr Go reckons that urbanisation could be as low as 25%, based on data from the Global Rural Urban Mapping Project, a global population map. That would imply three farmers for each city dweller. It suggests that, even though much of the country is cut off from the food-distribution system, rural dwellers survive precariously through subsistence farming.

Transport—or rather the lack of it—may be another, unintended form of social control. North Korea inherited railways from the former Japanese colonialists that run predominantly up the west of the country. That is the more populated side: the food-distribution system works better there than in the rural north and east. Ahn Byung-min, of the Seoul-based Korea Transport Institute, has made 40-odd trips to monitor the distribution of South Korean food aid. His photographs show how decrepit the rail system is, with rotten railway ties, different track gauges and bridges that are still pockmarked by bullets from the Korean war. Yet communication by road is even harder, Mr Ahn says, which further isolates the rural areas. Some cars have crank handles, or are powered by wood-burning stoves. He showed a photo of one old truck stamped with a star for every 50,000km (31,250 miles) on the clock. The stars added up to 1m km.

The tentative conclusion is that North Korea has not only managed to cut itself off from the world, but also created an internally isolated underclass, mostly in the east, that is left to fend for itself. The underclass's isolation reduces the burden on the state—and the odds of it rising up in organised fashion to challenge the regime.