Third world countries were set last night finally to win the right to get anti-Aids, malaria and other vital medicines cheaply.
After two years of disputes the World Trade Organisation was poised to rubber stamp a deal, previously rejected by the United States, ensuring that poorer nations can import affordable generic drugs.
The US and the European Union were however resisting pressure from the big pharmaceutical manufacturers, which were offering key concessions in exchange for the loosening of licensing restrictions.
Under existing WTO rules, countries facing public health crises are prevented from overriding patents on vital drugs and ordering copies from cheap generic suppliers unless they bought from domestic producers. But few developing countries have a domestic pharmaceutical industry.
Five countries representing all sides to the dispute - the United States, Brazil, India, Kenya and South Africa - hammered out the wording of an agreement in Geneva on Wednesday. Delegates to several countries held up a final vote yesterday to ask detailed questions, but none indicated a problem so big as to impede reaching an agreement ahead of the WTO's ministerial meeting in Mexico in two weeks.
Pharmaceutical companies have much to gain by promoting their own brands and blocking out generic imitations, which usually cost a fraction of the price. After months of floating different forms of wording, the US backtracked, giving only a general assurance that the liberalisation of drug licencing would not threaten the market dominance of brand name, drugs such as Viagra.
But some campaigners were angry last night. Kenyan activists accused Washington of bullying poor countries into accepting a raw deal.
"The United States basically caved in," said James Love, an intellectual property expert with the Washington-based Consumer Project on Technology.
Although welcoming the US climbdown, non-government organisations such as Mr Love's are far from happy with the final agreement, saying the wording creates a web of red tape for any developing country to cut through in order to obtain a so-called "compulsory licence" permitting the import of generic drugs. Among the diseases in most urgent need of widespread treatment at the cheapest possible price are AIDS, malaria and tuberculosis.
One particularly harsh assessment came from Oxfam, which said: the deal "would be disastrous for poor people around the world. The text contains so much red tape and so many obstacles".
Mr Love said his main objection was that all licence applications would be handled directly by the WTO. He saw this as "a very dangerous form of mission creep" for the agency, which has been under fire for years from opponents of corporate globalisation for its lack of democratic accountability and susceptibility to lobbying pressure from multinational corporations.
He also objected to what he said was a differentiation in import rules between big-market countries such as the USA and smaller markets in the Third World. He accused the United States and European Union of introducing "blatantly protectionist" measures to minimise the number of their own generic imports from countries such as India and Brazil in ways that do not apply to smaller, less affluent countries.