A SINGLE pill of Abilify, a drug used to treat manic depression, costs $30 or so in America. Or you could try gAbilify (the g stands for “generic”), better known to chemists as Aripiprazole. Thrifty pharmaceutical companies, many of them in India, can provide it for less than $1 a pop since the drug’s patent expired in 2015. That is bad news for Otsuka and Bristol-Myers Squibb, the two labs that formulated Abilify and got it approved by authorities in the 1990s. Everyone else, from patients to insurers to the public purse, is correspondingly better off. Generics-makers have thrived, particularly in India. But the prognosis for the industry is less rosy.

India became the world’s biggest exporter of generics almost by accident. Lax intellectual-property rules in the 1980s allowed its firms to crib drugs patented elsewhere for its huge domestic market. Trade deals gradually opened markets abroad. As patents for a wave of drugs from the 1980s expired two decades later, sales of Indian generics surged.

Their off-brand pills, vaccines, patches and syrups help contain health-care costs in rich countries and supply poor ones with once-unaffordable drugs to combat AIDS and other scourges. Firms like Cipla, Sun Pharmaceutical, Lupin and Dr Reddy’s have become pharma’s quiet titans. Indian pharma companies sold $29.6bn-worth of pills and potions in 2017.

America accounts for two-fifths of that. Sales there have grown by 30% a year for the past decade. The Food and Drug Administration (FDA), which licenses medicines, has embraced generics and made rapid approval easier for copycat drugs. Nearly 550 labs in India supply the lucrative American market, which is now 90% generic by volume. From virtually nothing at the start of the century, around a billion prescriptions made out by American doctors every year are fulfilled with drugs from companies based in India.

The FDA’s approval came with conditions attached, however. Notably, these included site visits carried out by its dozen-plus inspectors in India. Several plants have flunked these because of poor hygiene or deficient processes, such as a failure to keep track of manufacturing glitches. A giant factory in Halol owned by Sun Pharmaceutical, the biggest Indian firm, has been unable to export new drugs to America since 2015.

The FDA also wants to see more competition in generics. The agency is licensing ever more foreign drugs and labs—including Chinese ones—for imports to America, undercutting Indian incumbents. It wants to see multiple generics approved for each medicine, to limit pricing power. Wholesalers, distributors and retailers of drugs in America (such as hospitals and pharmacies) have merged or ganged up in consortia to help contain rising drug costs.

The side-effects are already showing in India. Indian companies’ sales of generic drugs have been flat for the past two years, and profits in the most recent quarter were down by a third compared with a year ago. Analysts expect profits from America to erode by around 10% annually. Prosecutors in 45 American states suspect that price-fixing helped to fatten margins earlier this decade. That could result in large fines for guilty firms. As easy-to-copy blockbuster drugs become rarer, moreover, manufacturers of copycats may see their lifeblood threatened. An index of Indian pharma companies has fallen by a quarter in two years, at a time when the broader market grew by 40%.

There is no obvious cure. Prospects for growth in other markets look mixed. Europe and Japan are less keen on generics than America, for now. Patients in poor countries are popping more pills as their incomes rise. But regulators there have a tendency to cap prices—a phenomenon which has crimped Indian pharma at home for years.

In response to these pressures, Indian firms have turned to more intricate products, such as patches and inhalers, as well as to more complex drugs. These are trickier to develop but offer better margins. Research-and-development costs have crept up as a result, although the top seven labs in India jointly spend around $1.5bn a year on innovation—about a fifth of what a large Western pharmaceutical company splashes out.

More dramatic treatment may be in order. Consolidation has helped generics giants elsewhere to cut costs. Teva, based in Israel, and Mylan, an American company, both slashed their workforce after recent takeovers. But Indian firms, though listed, are still controlled by their founders. Many are run as family businesses, which tend to be averse to mergers.

The industry’s panjandrums insist that a new culture of compliance will make FDA site closures a thing of the past. Once in denial over challenges to their business model, the generics-makers now acknowledge the symptoms afflicting them. It is not yet clear that they know how to cure the underlying condition.