The fall of the last Retail Price Maintenance agreement in the UK is a step nearer with the Government's commitment to referring the pricing of over-the-counter medicines to the Restrictive Practices Court. Pharmacists say it will be their death-knell, while consumer groups and the supermarket chains are hailing it as the end of over-charging for brand-name pain-killers. For the 2000 people of St Boswells, the debate is academic. Despite the best efforts of the community council and John Pollock the pharmacist, their pharmacy is about to close. ''The contract with the health board will be there for anyone who wants to take it on, but they will need to work a miracle,'' says Mr Pollock.

It is just one illustration of the fragility of many community pharmacies. Ironically, the smaller they are the more they depend on dispensing fees and less on pharmaceutical sales. ''If the RPM on medicines goes, pharmacies will not close overnight, but it simply becomes a question of when do you throw in the towel,'' according to John D'Arcy, director of the National Pharmaceutical Association.

He believes up to 3000 community pharmacies (25% of the 12,000 in the UK) are at risk, mainly because the Essential Small Pharmacies Scheme does not work. ''Although it is a top-up payment to pharmacies who dispense a very low number of prescriptions, the money comes from the global sum allocated by the Department of Health and the health departments in Scotland and Northern Ireland, so that if the present number of 300 essential small pharmacies were to be increased to 600, there would still be the same amount of money to go round. I can tell you that if you are running an essential small pharmacy and want to sell your business, you won't be able to because no-one in their right mind will buy it,'' he says.

According to the Consumers' Association, retail price maintenance is the wrong tool for the wrong target. ''It does not help rural areas, it is simply a tax on the infirm. Rural and disadvantaged communities should have adequate access to pharmacy services but this should be managed through the Essential Small Pharmacies Scheme, set up specifically to protect rural and vulnerable consumers,'' says Sheila McKechnie, director of the Consumers' Association.

Pharmacists oppose that view with one voice, whether they work in one of the major multiples or the smallest individual shop, according to George Romanes, chairman of the Scottish Pharmaceutical General Council, which represents all 1100 community pharmacists in Scotland.

''I don't dispute that the end of retail price maintenance would enable the consumer to save a few pence on over-the-counter medicines, but what these consumer groups are not taking into account is the added value which the pharmacist provides in terms of knowledge and advice.

''For example, ibuprofen, which is no longer restricted to pharmacies but is now on the general sale list and available in supermarkets and corner shops, will cause an adverse reaction in 20% of people with an asthmatic condition and should not be taken by people with stomach ulcers because it can cause them to bleed. There is a warning in very small print, but the pharmacist will ask the questions which will prevent an adverse reaction,'' he says.

The last time the Restrictive Practices Court considered the issue of resale price maintenance on over-the-counter pharmaceuticals in 1970, it decided that manufacturers should continue to enforce minimum prices for their branded products. Now the consumer watchdogs agree with the supermarket giants that RPM is a tax on the infirm.

Asda, which has long been campaigning for the abolition of price-fixing on medicines, claims that the current restrictions add #300m a year to the cost of medicines and healthcare products. In 1995, it cut the price of 80 vitamins in its supermarkets, but had to restore them after injunctions from the manufacturers.

Deirdre Hutton, chairman of the Scottish Consumer Council, believes that the price of over the counter medicines and the remuneration of pharmacists are different issues which have to be separated from one another.

''Pharmacists offer an extremely important service and they should be paid to do what is in effect part of the NHS; I do not think they should be supported by overcharging for medicines. We should identify the service that is required and pay for that. Most consumers do not need advice to buy aspirin or painkillers, which is all the medicine that most people buy over the counter. If people did not self-medicate, the pharmacists would be overwhelmed,'' she says.

The pharmacists argue that the RPM increases the cost to consumers by only 6p to 10p a week, the price of safeguarding the vital service of the community pharmacy for the less mobile members of society (who also tend to need more medicines): the elderly, the poor, and mothers of very young children.

George Romanes says his worries are pharmaceutical as well as financial. ''The Government has supported the practice of reducing the size of packs of analgesics and the move to blister packs to cut down the risk of poisonings. Now they seem to have made a complete U-turn. You could put as many packs as you like in a supermarket trolley and no-one would stop you at the check-out. We could now find price-cutting promotions of the buy two, get one free variety.''