From safety regulations to noise restrictions, a formidable array of rules govern Europe’s airlines. But the law they despise more than any other concerns passengers’ rights, known as EC261 and often described as the Denied Boarding Regulation. But cases of travellers being booted off overbooked flights comprise only a tiny proportion of payouts that airlines are obliged to make.

The main pain suffered by airlines is for flight arrival delays of three hours or more. For short hops, compensation is set at €250. For trips such as UK to Greece, it’s €400. And for 3,500km flights or longer, €600 (except, bizarrely, if the delay is three to four hours, in which case the payout is halved). So that’s anything from £215 to £520, whether you have been held up for four hours or 40.

An airline need not pay when “extraordinary circumstances” are to blame. Examples include air traffic control strikes or bad weather, both of which have traumatised travel in the past week.

But in a series of court cases, the list of allowable excuses has shrunk. A bizarre lottery has been created, in which a few minutes can make all the difference between a payout of several times the airfare, or getting nothing but increasingly frustrated.

Airlines, faced with paying out many millions of pounds when stuff happens, have adopted a range of responses. Some grit their teeth and pay out when it’s a fair cop. Others seem to have concluded that the chances of a rap on the knuckles from officialdom are so remote that they can delay, obfuscate and sometimes fib in order to deflect legitimate applications for compensation. And many refuse claims when, as often happens, a delay has multiple causes: seizing on a mild air traffic control delay when a more significant factor was a mechanical issue.

All of which makes this a rich seam for the legal profession and the claims firms that feed off the phenomenon of “free money”. If a flight you took in 2012 arrived three hours late, they say, there’s a pot of cash waiting for you.

Bott & Co, based in Wilmslow, are the market leaders. Unlike many claims handlers, Bott is a proper law firm, under the watchful eye of the Solicitors Regulation Authority. It began its flight delay business five years ago, and since then has handled claims for 126,000 passengers, and claims a success rate of 99 per cent.

The average payout is £285, of which Bott keeps a third. With almost every claim succeeding, that amounts to almost £12m in fees, with passengers picking up £24m.

After several visits to the firm over the past five years, I conclude that it is fighting a pretty good fight over a profoundly flawed piece of legislation. Prominent on its website is a flight-delay compensation letter which you can download for free and send direct to the airline, bypassing the firm.

Ryanair, Europe’s biggest budget airline, insists that you apply direct, saying you can only claim via a law firm if you have given it four weeks to respond. Both & Co challenged this condition in the High Court. But this week the judge, Edward Murray, said it was reasonable because: “Ryanair has established a straightforward and easy-to-use process for its passengers to make their flight delay compensation claims, either online or by correspondence, without the assistance of a third party.”

Kenny Jacobs, chief marketing officer for Ryanair, told me: “There’s a principle involved. For every £10m in compensation, £4m or £5m ends up in the pockets of solicitors, not customers.

Mr Jacobs speculated that other carriers will now follow Ryanair’s practice, saying: “If you get full compensation you’re better disposed to that airline.”

Bott & Co is furious, and plans to appeal. Coby Benson, a solicitor with the firm, said: “It is a harsh law, but the law is the law, and for as long as it remains in force, we’ll be here to protect the rights of passengers.”

The firm has helped clarify some shockingly badly drafted rules. But if compensation was generally lower and proportionate to the fare paid, the system would become less confrontational. Airlines, lawyers and judges could get on with more productive ways to increase the sum of human happiness than squabbling over flight delays.