AFTER a night of civil war, the feral dogs that live around Sarju Prasad's mud hut in Shahabpur, a village in eastern Uttar Pradesh (UP), have, at last, gone quiet. It is 5am. From a charpoy—a bed of sticks and string—set outside the hut, the boughs of the overhanging trees are dimly visible. Then a clumsy-footed crow awakes in them, stirring the branches and croaking mournfully. And with a creaking of its rickety string-bound frame, Sarju rises from the adjacent charpoy, steps between a dozen curled-up canine forms, and begins his working-day.

It starts early because he has two jobs. Sarju, who is around 45, mends shoes in Shahabpur's bazaar, a rutted street lined with around 30 shops. Hence his nickname: “Mochi”, or “cobbler” in Hindi. He also disposes of dead buffaloes, cattle and goats. Using a small bicycle cart, now tucked securely between the hut and its flimsy stockade of thorn-branches, he fetches the carcasses, skins them and leaves what remains for the dogs. He roughly cures the skins and sells them and the bones to a local trader. This earns him somewhere between 500 rupees ($11) and 1,500 rupees a month, and no friends.

Working leather has been Sarju's family profession for centuries. Hinduism has ordained it. The family is of the chamar, or tanning, caste, one of dozens traditionally dedicated to menial or “unclean” occupations, and therefore considered “untouchable”. This discrimination, suffered by around one in five Hindus, was banned shortly after India won independence in 1947. Yet it is to varying degrees still apparent in the countryside, especially here on north India's vast and teeming Gangetic plain.

An inviolate wasteland, littered with human and animal turds, surrounds Sarju's two-room hut, which he shares with his wife, Sushila, and their three children. As the village midwife she performs another unclean task; it may seem odd, but conservative Hindus despise the woman who delivers their babies, because she comes into contact with the afterbirth. Making matters worse for the couple, they are considered outsiders, having migrated to Shahabpur two decades ago, from the neighbouring state of Madhya Pradesh. They are not invited to village weddings. Sarju says he lives in fear that his hut will be torched by a resentful neighbour. And he has never previously entertained a guest.

That a British correspondent invited himself to stay, during a weeklong sojourn in Shahabpur to see how village India ticked, was remarkable to Sarju. That the journalist's translator, a young, middle-class brahmin—a member of Hinduism's priestly caste—also broke bread with the family was perhaps stranger still. “I could never have imagined”, Sarju says, “that I would see such people in my home.”

The autumn sun has now risen, burning wisps of mist off the green paddy-fields that are everywhere in Shahabpur. From a nearby hamlet, half a mile away, comes a happy clanking of cooking-pots and children's shrieks. In the wasteland outside Sarju's stockade, two men, squatting a modest 20 yards apart, are chatting companionably as they take their morning purge.

Sarju: shoemender, tanner, merchant of bones and your correspondent's host

A cyclist, wearing a chequered-blue sarong and T-shirt, the attire of many village men, pulls up outside the hut. In silence, he shins up a neem tree near the hut, breaks a twig from it, and slithers down again. Lounging in the gateway, he peels back the twig's grey skin and begins chiselling it against his front teeth, softening the end into a fibrous brush, which he then works around his back teeth and gums. Neem contains a mild antiseptic and provides such toothbrushes for millions of poor Indians; even middle-class ones use toothpaste made from it. Staring by turn at Sarju and at his guests, the man splits the twig down the middle and gives his tongue a good scrape with its green inner parts. Then he tosses it aside and pedals away, with no word spoken.

This seemed uncivil, but perhaps wasn't. Neem trees are considered fair game in the village. And Shahabpuris greet each other sparingly. Yet the thought occurs because, underlying the village's bucolic charm, there is a lot of rudeness about. The 10,000-odd villagers—who make Shahabpur a medium-sized settlement in crowded north India—are arranged largely on the basis of caste. They live in caste-based ghettos; rarely socialise across caste lines, and never inter-marry. And the village dalits, as the former untouchables are now called, are often abused.

For a few rupees or a handful of rice higher-caste men demand, and get, sex with dalit women

The chamars, the biggest of Shahabpur's half-dozen dalit caste-groups get the worst of it. They are, not coincidentally, the village's poorest people. And several villagers—including from Shahabpur's small Muslim community, well-informed observers of Hindu wiles—say they are routinely bullied and beaten. The worst dalit-bashers are said to be the patels, Shahabpur's biggest community, which is about 3,000-strong. They are typical bullies: of a low-caste peasant order, the patels are just a rung or two higher up the caste ladder, which makes them jealous guardians of their perceived superiority.

There is an exception to the caste divide in Shahabpur, which many Muslim and Hindu men enjoy. For a few rupees or handfuls of rice, they are said to demand and get sex with dalit women, typically just after sundown, when the villagers troop out to the fields to ablute. At an informal gathering of Muslim men outside the house of Anwar Ali—an upstanding clerk, who also housed your correspondent—it was estimated that perhaps 40% of the village's non-dalit men upheld this ancient tradition. According to Sarju, until Sushila lost her youthful good looks, he suffered near-nightly terrors from drunken patel youths, who came clamouring for her outside his hut.

This practice recalls a famous condemnation of village India by one of the country's founding fathers, B.R. Ambedkar. The architect of the country's 1949 constitution and a dalit, Ambedkar asked: “What is the village but a sink of localism, a den of ignorance, narrow-mindedness and communalism?” (Mohandas Gandhi, by contrast, considered the villages to be India's ideal social units.)

In economic terms the countryside, where two-thirds of Indians reside, is also languishing. Agricultural yields are stagnant and landholdings shrinking. Longstanding efforts to halt this decline, with massive subsidies on fertilisers and public procurement of grains, have proved corrupt and inefficient. Yet on the basis of this short stay in Shahabpur more change is afoot in India's villages than is commonly supposed. And much is positive.

Like much of east India, Shahabpur has rich alluvial soil, a gift of the Ganges, which flows three miles to the south. Its agricultural productivity is nonetheless stunted; the number of families living off farming is shrinking. Yet the village is only 30km from the city of Allahabad and has decent road and rail connections to the fast-growing cities of west India, like Pune and Mumbai. This has encouraged the village men to go looking for work there, on construction sites and in factories. Around 1,500 of them, almost a third of the able-bodied workforce, now regularly migrate, and the local economy is benefiting from the cash they send home.

The number of shops in Shahabpur bazaar has doubled in five years; three private schools have also sprouted there. This growth, along with other changes, is starting to transform the village. Not everyone will profit: its effects will be seismic. For example, many village men currently pursue their traditional caste occupation, yet do not expect their sons to follow them. That is either because they want better for their children, or because their hereditary skills are becoming redundant.

To the bungalow born

The verdant paddy-fields, watered by a British-built canal system and now sparkling in the morning sun, give no clue to Shahabpur's agricultural malaise. But the fecundity of east India is part of the problem: having allowed massive over-population. Since 1951, when land reforms began that would settle almost every family in Shahabpur on its own plot, the village population has quadrupled. The resulting sub-division has left very few holdings big enough for commercial use. Shahabpur's biggest farm under cultivation is around 15 acres; only a couple of hundred families possess as much as an acre. And consolidation of landholdings is hard, because of the thicket of family and legal disputes that invariably surrounds them. As a clue to this, land prices are high in Shahabpur, at around 1.5m rupees an acre, but land transactions are rare.

Surya, almost the only brahmin in the village

“It's completely unviable to buy land and farm it commercially here,” says the area's biggest landowner, Amresh Pratap Singh, seated beneath the ramparts of his elegant British-built mansion on Shahabpur's edge. This bungalow, as he calls it, first belonged to a British officer, Captain Chapman, who bought the local estate after it was forfeited by one Sanghram Singh, a leading light in the great mutiny of 1857. The Britisher established an indigo plantation in Shahabpur, but soon sold the property to Mr Singh's great-grandfather, who ruled a vast neighbouring estate, consisting of over 700 villages. Mr Singh's family lost most of its land in the land reforms: it retains only 90 acres of orchard in Shahabpur. Yet the villagers still refer to his aged father as the “raja”, or “king”, and stand to one side during his occasional saunters through the village.

Captain Chapman is remembered by the ruins of his indigo warehouse in a hamlet named after it, Godown. It is one of a dozen caste-based clusters in Shahabpur, roughly half a mile apart. Most residents of Godown, a huddle of mud and brick huts, are dalit, especially chamars and dhobis, of the Hindu washer caste. Similarly, the nearby hamlet of Inara is entirely for patels—living in two-storey houses, well-spaced between their fields of ripening rice-paddy.

Another order of dalits, of the pasi community, is even more set apart. By tradition, they are swineherds; dalits, unlike higher-order Hindus, being meat-eaters. They also brew liquor from the flowers of the mahua tree and, because of this and a reputation for banditry, were deemed a “criminal caste” by the British. That brought harsh sanctions on the pasis; yet crime can pay. The pasi ghetto, Pasiyapur, is set a mile apart. Yet its brick houses, on the banks of a large fishpond, are as lofty as the patels'. Small black pigs root around them, and hidden in the pond, though the pasis deny it, there are barrels of fermenting mahua flowers.

Shahabpur's smaller caste-groups are more intermingled, though discreetly separated by walkways and ditches. For example, the village's three brahmin families—an unusually small complement in northern India—have three low-caste neighbours: some patels, chamars and yadavs, of a Hindu herder caste. Surya Narayan Pandey, a 52-year-old brahmin with a ritual dab of scarlet vermilion on his forehead and a holy thread around his naked torso, says that he would gladly share a meal with any of them—“even the chamars, why not, so long as they're clean?” But that hasn't happened yet.

The Muslims, or Turks, as they are known locally, in many ways mirror their Hindu neighbours. They have their own hierarchy—even though Islam rejects caste divisions—in which the qureshis, who claim origins in Arabia, are the clear winners. Mostly traders, the qureshis include some of Shahabpur's richest residents, and they are cashing in on the economic boom. In the village bazaar Muhammad Afsar, a 26-year-old qureshi and graduate of Allahabad university, has opened two mobile-handset shops and says business is good. In the past three years most families have acquired at least one mobile connection.

The bazaar is also home to members of two poorer Muslim groups, who are said to be descended from low-caste former Hindus. They are dafalis, drum-makers and minstrels, and churiharan, peddlers of bangles. Members of the three Muslim groups worship together in the village mosque, but never inter-marry.

Peace comes dropping slow

Hindu-Muslim relations are good. On a stroll through Shahabpur bazaar, Mr Ali hails his Hindu friends in the name of their god—“Ram! Ram!”—and his Muslim friends with “Salaam aleikum!” This was at a sensitive moment in India's inter-communal history. Later that day a legal ruling was expected, from the Allahabad high court to settle a longstanding and bloody Hindu-Muslim dispute. It concerned ownership of a medieval mosque-site in Ayodhya, in eastern UP, and in 1992 had prompted Hindu-Muslim rioting across north India in which at least 2,000 died. Anticipating trouble, police across UP—a state of 180m people—were on high alert. Text-messaging services had been suspended. But no one in Shahabpur, Hindu or Muslim, seemed concerned. “We have no problem with each other, so what is there to worry about?” said Mr Afsar. India's Hindu-Muslim violence is largely an urban phenomenon. In this regard, Gandhi's paean to the village was spot-on.

Nor, casteism aside, is there much crime in the village. That is lucky, given that the nearest police station is nearly 20 miles away, and its dozen fully fledged officers are responsible for 90 villages and over a million people. Shahabpur receives only occasional visits from the station's semi-trained constables, who are principally shake-down merchants. In fact, the Indian state, which can seem vast and throttling in the cities, is hardly present in the village. It has two government schools, but no health-care facilities, aside from a few quack doctors in the bazaar. The government is mostly evident in several welfare schemes, controlled by the village's elected leader, or pradhan. These are hopelessly corrupted.

Most of the poorest villagers seem to get alms of some sort. But so do many richer ones. And, on the basis of interviews with several dozen villagers, there is no second-guessing who gets what. Sarju and other paupers have been issued with “above the poverty line”, or APL, ration cards, entitling them to some subsidised kerosene. Luckier villagers, from all the main caste-groups, have got their names down for another scheme, Antodaya Anna Yojana, which provides 35kg of cut-price rice a month. Seemingly at random, a few have hit the jackpot by getting “below the poverty line”, or BPL, cards, which entitle them to a basket of subsidised food and fuel.

There is a political logic to this. For the local politicos who control them, these entitlements are a source of campaign funds. Almost every interviewee said he had paid a bribe for his. They are also the main currency of political patronage. According to Pyara Lal, the manager of Shahabpur's government ration shop, around a quarter of the village's BPL card-holders are relatively prosperous patels—a consequence of the last two pradhans having come from that caste-group.

Mr Lal, who is popularly considered to have the best job in Shahabpur, also admits to skimming off a share of the loot. He puts his pilferage at a modest 2kg of rice for every 52kg-sack he handles. “I'm only paid 900 rupees a month, so of course I have to steal!” he explains.

The patels' time at the trough was coming to a close, however. Local elections were due, in which, as an affirmative-action measure, Shahabpur was to be reserved for a dalit pradhan. Resplendent in an ancient Maruti jeep, Doodhnath Pasi, a local contractor, former pradhan and favourite in the poll, passed your correspondent on his way to register his candidacy. Stopping to chat, he said: “All the village is with me, caste is unimportant!” And behind him, his army of motorbike-riding attendants loudly cheered—every one a pasi.

All UP's politics is caste-based. Over the past two decades it has been defined by the rise of low-caste outfits, including the ruling Bahujan Samaj Party (BSP), which is led by a dalit woman, Mayawati. In a patronage-based democracy, where caste represents the prevailing identity, this was inevitable. Yet it was hastened by the poor performance of the Congress party, India's biggest, UP's former ruler and the dalits' original champion. Shahabpur falls within the first parliamentary constituency of Jawaharlal Nehru, Congress's tallest leader and India's first prime minister. Yet there is little love in the village for India's grand old party.

Ram Din, a 70-year-old chamar in Godown, says that he and his relatives all switched their vote from Congress to the BSP in the 1990s, and like many dalits, he speaks of Ms Mayawati with reverence. During the 1950s his grandfather served as Nehru's bugler, announcing the prime minister at rallies across India. Disillusioned, according to Mr Din, he threw his bugle into the Ganges shortly before he died.

Viewed from Delhi, India's capital, caste-based parties like the BSP are more or less deplorable. They have run dreadful governments in India's most populous state and are prodigiously corrupt. Ms Mayawati, a former primary-school teacher, is known for her love of diamonds and dalit-sized garlands of banknotes. Considered from the village, however, these excesses seemed easier to overlook. No other party has done much for Shahabpur's downtrodden, after all. And the inspiration many dalits find in Ms Mayawati is impressive. Sarju has travelled to several of her rallies, and speaks of the dalit queen, as Ms Mayawati is sometimes called, with awe. Her government has done nothing for him, yet it represents a precious promise of protection.

An anecdote illustrates this. Two months ago, while Sarju was visiting his parents in Madhya Pradesh, his 13-year-old son Ravendra was beaten senseless by two patel neighbours. The boy had skinned and dumped a buffalo carcass, from which a dog took a meaty bone into their field. Ravendra, who carries scars from this beating, was discovered by the local skin merchant, who informed the local BSP partyman, who reported the matter to the police. They took no action. Yet this flicker of official interest in their plight represents significant progress for Sarju and his family.

Go west, young man

The relative prosperity of the pasis is partly their leader's doing: as pradhan, Doodhnath Pasi naturally favoured his outcast confrères in the welfare racket. Yet it owes more to the alacrity with which they, before any other community, seized on the opportunities of migrant labour. Lounging on a charpoy in Pasiyapur, the former pradhan says that all its 60 pasi families have at least one son working away.

Over the past decade or so other caste-groups have followed the pasis' lead, especially the chamars. Sunil Kumar, a 32-year-old in Godown, was on leave from a textiles hub near Mumbai, Bhiwandi, where he operates a power-loom. Earning 220 rupees a day—more than twice an agricultural wage in Shahabpur—he works for eight months, then returns home for two months with around 10,000 rupees in his pocket. It is a tough life. Yet it is leavened by a reasonable hope of something better for his two young children. Mr Kumar, who had only a few years in primary school, says that educating them properly is his main ambition.

Gulle Abbas, last of his kind

Returning migrants like Mr Kumar, who wears a dandyish embroidered shirt alongside his bare-chested neighbours, are driving social as well as economic change. The local women prefer them. They also bring back fancy ideas, such as a dislike of pond-washed clothes, to the dhobis' dismay, and a preference for toilets over squatting in the open. This second form of newfangledness has been slow to catch on, however. It is second nature in Shahabpur to walk along the middle of roads—to avoid stepping on the turds lying thickly either side.

New migrant wealth also threatens to shake up the ancestral balance of power. While the outcast pasis are flourishing, in relative terms, many in Shahabpur's peasant castes, including the patels, are struggling to stay still. They are more reluctant to migrate because their landholdings are bigger—but not big enough to prevent them sinking towards poverty. Lalta Prasad, a patel farmer in Inara, says that he inherited barely half an acre of his father's six acres. He therefore sent his son, Hori, to work in Mumbai, but the youth failed to get on there and came home. This has left the family in a bad way.

The failure of less powerful caste-groups to adapt is more pathetic. Consider the kumhars, Shahabpur's potters. With the mass introduction of cheap plastic receptacles over the past decade or so, their livelihood has collapsed. Jokho Lal, who is 40 and heads one of the village's 35 kumhar families, says he stopped making clay pots for storing food and water ten years ago. The village potters now make only small disposable cups for the tea-stalls in the village bazaar. They sell these for 12 rupees per 100, which adds up to a day-wage of around 40 rupees—less than a quarter what a good potter earned a decade back.

But Mr Lal has not lost his skill. Invited to display it, he lifts a heavy stone slab onto a metal spike in the ground and spins it to a blur with a bamboo stick. With wonderful dexterity he then throws a handful of wet clay onto it and, before the stone slows and falls to the ground, shapes it into a rotund pot. Mr Lal is teaching this skill, which he considers “useless”, to none of his children. Yet the kumhars have found no alternative employment. For lack of the necessary connections, Mr Lal says, none has yet migrated for work.

The withering of ancient skills was a doleful theme in Shahabpur. Metal-workers, of the johar caste, are increasingly switching to carpentry, as machine-tooled implements become more common in agriculture. And in the bazaar, Gulle Abbas, a dafali aged around 65, also said he would be the last of his kind. Accompanying himself on a hand-made drum, a tube of mango-wood covered with goat-skin at both ends, Mr Abbas sings Hindu, Muslim and folk songs in pukka Hindi and its local dialect. In June, when the rice is sown, he sings for farmers in their fields, as he says his forebears have done “for a thousand generations”. None of his three sons has learned this skill; two are working on construction sites in Pune and Mumbai. “After me, it will be over: people no longer love drumming,” he says. Then he, too, shows off his skill. Working up a rhythm on his drum, he softly sings a Muslim hymn.

There is no typical Indian village. India is too vast and its cultures and ecology too diverse. Much that is true of Shahabpur will be irrelevant elsewhere. Yet the socio-economic pressures evident here are being felt across much of the country. Agriculture is in the doldrums, so millions of peasants are leaving the land, to find alternative work at home or in distant cities. Many are struggling: India's services-led economic growth is creating too few semi-skilled jobs. Yet, if Shahabpur is any guide at all, the boom may be more far-reaching than is often supposed. And with the country expected to sustain high growth rates for many years, it will in the end bring about massive changes.

Millions of poor Indians will rise out of poverty—a glorious thought. Yet it is hard not to mourn much that will fall victim to this transformation. Artisan skills will be lost; so will local cultures; and perhaps, too, some of the stability, vile discrimination withal, in India's traditional Hindu society.

But these seem distant prospects, from a charpoy outside Sarju's mud hut, as night falls on Shahabpur. Fireflies sparkle in the gloom. The dogs, snarling theatrically, are beginning their night-time tear-up. And inside the hut a clanking of steel plates signals that the poor host is about to serve up a meal of spicy dal, rice and home-grown curried vegetables.

It has been cooked by Sarju's ten-year-old daughter Kavita. Hugging her knees, she stares anxiously at her father's guests, who sit cross-legged around a smoky kerosene lamp on the smooth mud-floor. Assured that the food is delicious—which it is—she smiles shyly and starts clearing plates. Then, prompted by her father, she reaches into the darkness and produces pudding. It is a single gulab jamun, a syrupy, plum-sized sweet, fetched with tremendous care that day from Shahabpur bazaar.