Townies may be a bit hazy about cattle cake or baler twine, but they know one thing about agriculture: farmers are all broke and supermarkets are the reason why.

It's certainly true that supermarkets - whose dominance of retail trade is now almost total - seem to have unlimited opportunities to squeeze their suppliers.

But things may just be about to change.

After years of breast-beating and public indignation, some cannier farmers are learning to work the system to their own ends.

Tied up in chains

On the face of it, Britain's food market works firmly against the interests of the farmer.

For more than 90% of the population, a supermarket is the main or sole place of shopping; supermarkets now corner the market not just in microwave curries and sun-dried tomatoes, but in basic commodities such as cheese and eggs.

This gives them tremendous bargaining power, says Stuart Thomson of English Farming and Food Partnerships, a quasi-government body which aims to make British agriculture more competitive.

"There's a massive chain between the producer and the consumer," he says.

"The farmer is the weakest link."

By focusing heavily on price, supermarkets have helped shunt aside many local producers: British farming output has actually fallen over the past decade, despite a near-50% increase in overall food consumption.

Here's the beef

Nor are supermarkets always sensitive in the way they wield this power, farmers say.

"I have never had to deal with such a penny-pinching bunch of bastards in all my life," says one Dorset farmer who does not want to be named.

"They see farmers as victims, not business partners."

Hyperbole aside, farmers have rational grounds for beefing.

The supply chains they sell into are troublingly opaque: for every pound's-worth of food sold retail, farmers earn on average 34 pence - a share that has dropped by 28% since the late 1980s - and accounting for the remaining 66 pence is far from easy.

A report into milk pricing, published earlier this year by a parliamentary committee, was unable to find out what happened to 18 pence of the 50 pence-per-litre price.

"The dairy companies should provide dairy farmers with a detailed justification of why it is that they appear to need to take such a significant chunk of the retail price," the report insisted.

Apple-bobbing

In practice, belts are probably being tightened all along the supply chain.

But that's not the way farmers see it: "If you don't know how your customer is doing his sums, you tend to end up thinking he's robbing you in some way," says Ben Miller, who runs a mixed farm in Yorkshire.

And supermarkets get black marks for their perceived capriciousness and opportunism in choosing suppliers.

Again, perceptions may be unfair: supermarkets insist they are as loyal to suppliers as can be expected in a civilised commercial relationship.

They don't let sentiment obscure the bottom line, however: a recent survey found that, at the height of the British apple season, more than half the apples on supermarket shelves came from abroad, from as far afield as South Africa, Brazil and New Zealand.

The road less travelled

So far, the traditional way for farmers to fight back has been to diversify in some way - creating new, ideally value-added products, or selling through unorthodox channels, such as farmers' markets.

These avenues have promise, says Sue Morris of Taste of the West, which promotes food producers in southwest England - but they are not a panacea.

"The opportunities are there, but farmers who diversify end up with a smaller market," she says.

Some retailers - notably Waitrose among supermarkets - are keen to listen to these sort of proposals. But because Waitrose has a policy of never becoming a farmer's dominant customer, its contracts are rarely a road to riches.

Overall, Ms Morris reckons, interest in this sort of diversification seems to be easing. "Most farmers who considered it will be doing it by now," she says.

Safety in numbers

A more promising trend is emerging, meanwhile.

British farmers have been notoriously slow to bunch together in co-operatives and other producer groups.

In Sweden, for example, output from co-operatives is more than twice as high as the rest of the farming business; in Britain, it is one-third of the size.

Nor has Britain developed many of the producer-led businesses that have become a feature of some international food and commodity markets - Dutch dairy giant Campina, for example, or Ocean Spray, the US firm that dominates the world cranberry business.

Producer groups have long been a feature of unsubsidised areas such as fresh produce, says EFFP's Stuart Thomson, but are only now starting to develop in subsidy-dependent areas.

"Farmers are selling to fewer and fewer large retailers, so it makes sense for them to work together," he says.

The milk of human kindness

The big growth area seems to be dairy - the sector of farming where relations between farmers and supermarkets are most tense.

If you want to create your own destiny, you have to shorten the supply chain

In August, Dairy Farmers of Britain, a group owned by 3,250 farmers, became the country's third-biggest milk supplier by acquiring the processing business of the Co-operative retail chain.

Retailers have proved receptive to the idea. In May Asda - a supermarket chain not so far known for its kindness to farmers - signed a UK-wide deal to buy milk from Arla, the country's biggest dairy firm.

Arla, although not itself a co-operative, buys from co-operatives and makes a point of being farmer-friendly; even more significantly, the deal ensures suppliers complete and unprecedented transparency as regards price.

Cutting the chain

Some optimists hope that producer co-operation will lead to farmers becoming "price-makers" not "price-takers".

According to Rob Knight, the chairman of Dairy Farmers of Britain, that might be an aspiration too far.

But, he says, such deals offer a host of other benefits.

First, they cut out the middleman - and perhaps allow dairy farmers to get their hands on the vanishing 18 pence-per-litre.

"If you want to create your own destiny, you have to shorten the supply chain," he says.

Second, they herald the introduction of sound business methods into farming.

"Retailers do support producers who get together," he says. "But you have to earn their respect by making commitments and sticking to them."

Local heroes

Ultimately, however, there's not likely to be a seismic shift in the balance sheet of British farming until consumer habits change.

It's what's inside that counts

"What is clear is that food is too cheap," says John Alliston, head of the agriculture faculty at the Royal Agricultural College.

"We should be spending more."

That may not happen. Market research firm Mintel calculates that two-fifths of consumers would be willing to buy more local produce - but that group is sharply slanted towards the elderly.

Young shoppers, meanwhile, have little interest in provenance. "It is highly unlikely that younger consumers will willingly give up their ability to buy produce all year round," Mintel says.

The only really booming part of the business is ready meals and other convenience food, precisely the area where British farmers are at the strongest disadvantage.

Farmers may be playing a cleverer game these days, but the supermarkets still hold all the best cards.