FOR a country that fails to meet its most basic challenges—feeding the hungry, piping clean water, fixing roads—it seems incredible that India is rapidly building the world's biggest, most advanced, biometric database of personal identities. Launched in 2010, under a genial ex-tycoon, Nandan Nilekani, the “unique identity” (UID) scheme is supposed to roll out trustworthy, unduplicated identity numbers based on biometric and other data.

Any resident who wants one can volunteer. The scheme combines work by central and state governments and a number of other partners—largely technology firms that capture and process individuals' data. The goal, says Mr Nilekani, is to help India cope with the past decade's expansion of welfare provision, the fastest in its history: “it is essentially about better public services”.

All that should have been the recipe for a project mired in delays, infighting, empire-building, graft and bad results. Few expected UID to hit its ambitious targets. A year ago, only a few million had enrolled and barely 1m identity numbers had been issued. Warnings about fragile technology, overwhelmed data-processing centres and surging costs suggested slow progress.

Instead this week saw the 110-millionth UID number issued. Enrolments (which precede issued numbers by some months) should reach 200m in a couple of weeks. Mr Nilekani, eagerly hopping about his office to call up data on his laptop, says that over 20m people are now being signed up every month. He expects to get to 400m by the year's end.

That is an astonishing outcome. For a government that has achieved almost nothing since re-election in May 2009, the scheme is emerging as an example of real progress. By 2014, the likely date of the next general election, over half of all Indians could be signed up. If welfare also starts flowing direct into their accounts, the electoral consequences could be profound.

To get a sense of the scale of UID's achievement, linger at a mosquito-ridden enrolment centre in Uttan Gaon, a coastal village north of Mumbai. Huddled in a damp fire-station a young man connects a laptop, a binocular-style iris scanner and a glowing green machine that records 30 points from a set of fingerprints. In the gloom, his contraption could be a robot from an early Star Wars film.

Employed by Wipro, a technology firm and agent for the UID project, he has to get through 40 to 50 residents a day. His hassles, and those of armies of others deployed all across India, look endless. At times no one comes to enroll. Local government is supposed to run campaigns to lure them in, but indifference, bad weather and non-stop religious festivals keep them at home or partying.

Other days, as when a (false) rumour crackles through a nearby slum that 100-rupee notes will be dished out to those who sign up, hordes pour in. Nerdy technicians are ill-prepared to manage frustrated and even violent crowds.

To hit his targets, the agent in Uttan Gaon must process each of the residents, who perch in turn on a red plastic chair, in 12 minutes or less. That is fine—but only for the young and educated. The day's first arrivals are a barely literate rickshaw driver, an elderly couple and a call-centre worker. Each one overruns. By mid-morning a long queue has formed, but the pace picks up.

Wipro and the rest work fast, since that is the only way to turn a profit. One of 35 agents active in Maharashtra state, it bid to be paid just 26 rupees (50 cents) for each person processed, with a higher rate in rural areas. It supplies all equipment and staff, and uploads the huge amounts of data to central processors. It also copes with thefts, damp cables that break the iris scanners, and labourers' fingers so worn that their prints do not show.

Still, contractors look far nimbler at solving myriad problems than civil servants, who are still hampered, for example, by rules ordering that all official communication be done on paper (e-mails will not do). Speed matters. An agent hitting targets can bid to take work off laggards. This flexible “ecosystem”, designed with help from Indians working in Silicon Valley, thus lets the most efficient prosper. To fund it, the central government dishes out 100 rupees, which various partners share, but only once each identity number is issued: “we have built a system where everyone has an incentive to get results”, says Mr Nilekani. And these are striking: Wipro alone has had nearly 6m numbers issued, of more than 22m issued in the state as a whole.

As it grows, however, the project is drawing fire. Most pressing, the mandate of the UID authority will expire within weeks—once the 200 millionth resident is signed up. The cabinet has so far failed to extend it, though reformers are keen. Montek Singh Ahluwalia, the powerful deputy head of the national planning commission, for example, says he will allocate billions more rupees to UID as “the money will be more than fully covered from efficiency gains from government schemes”.

Total costs are rising as UID expands: its budget has more than doubled from nearly 32 billion rupees ($614m) for the first five years, to over 88 billion rupees for the next phase. But the government's chief economic adviser, Kaushik Basu, among others, agrees that savings by “plugging leakages”—that is, stopping huge theft and waste in welfare and subsidies—will be “very big, very beneficial”.

The real difficulties are political. They fall into two areas. Most immediate is the home minister, Palaniappan Chidambaram, who is blocking the new mandate. He says he worries about national security. He also looks annoyed that a rival biometric scheme to build a National Population Register (for citizens, not just residents) has been cast into the shade. Run by his home ministry, by late last year it had only issued some 8m identity numbers. He also has a longstanding rivalry with the finance minister, Pranab Mukherjee, who is associated with UID.

The prime minister, Manmohan Singh, will probably have to tell the home minister to give way. Then officials need to respond to a second, much broader, band of critics. Last month, for example, parliament's powerful finance standing committee issued a 48-page report attacking UID, calling it hasty, directionless, ill-conceived and saying it must be stopped.

Headed by Yashwant Sinha, a stalwart of the opposition Bharatiya Janata Party, the committee was eager to throw all criticism possible at the scheme. Yet the report contains testimony from a range of experts with legitimate objections. Some were procedural, including a demand that UID be based on law passed by parliament, not, as now, on a mere executive order.

Other worries, such as cost, should abate as the unique identities are tied to bank accounts of welfare recipients, and so help track the flow of public money. The omens are good. Last week Karnataka state claimed that by paying welfare direct to bank accounts it had cut some 2m ghost labourers from a rural public-works project.

Yet there are also tougher accusations from activists and development economists, such as Jean Drèze and Reetika Khera, in Delhi. They worry that the voluntary programme will turn compulsory, that individuals' privacy is under attack and that biometric data are not secure.

Along with others, they also oppose the logical next step in welfare reform that UID enables. Once recipients have bank accounts, India can follow the likes of Brazil and replace easily stolen benefits in kind, such as rations of cheap food and fuel, with direct cash transfers. Not only do these cut theft, but cash payments also let beneficiaries become mobile—for example so they can leave their state to seek work, while not jeopardising any benefits.

Yet Ms Khera is wary of change. She points out that well-run southern states get rations efficiently to the poor, and cites a survey which found many recipients, especially women, would prefer to keep getting rations over cash. They fear money is more easily wasted, say on alcohol. Worse, in the most remote places, cash welfare is no use since food and fuel markets do not even exist.

Such fears need answering. India will have to pass a law on data protection and privacy. A shift to cash welfare would have to ensure that mothers benefit most, not feckless fathers. And perhaps only as Indians grow more urban, mobile and well-connected will they see the full advantage of cash over rations. But for all the headaches, applying the UID to an expanding and reforming welfare system opens the way for profound social change. Indians need to get ready.