INDUS VALLEY is an unremarkable horse, or so punters thought when it ran in the 4.25 at Kempton Park, a racetrack on the outskirts of London, on January 22nd 2014. Given that it had been beaten by an aggregate of 104 lengths in its previous four outings—and had not competed at all for two years—odds of 25-to-1 seemed generous. Indus Valley won. Two earlier, minor races at other English tracks that Wednesday had featured unlikely comebacks by mounts that had been out of action for months. The 6.25 at Kempton Park delivered a final surprise. Low Key—an aptly named horse given its lack of pedigree, more so since it was running its first race since being castrated—finished well ahead of the pack. Obscure midwinter horse-racing is often unpredictable; still, what were the odds of four horses who had not won a race between them since 2010 all triumphing on the same day?

The answer, as bookmakers soon discovered, was 9,000-to-1. Wagering just £112 ($184) on all four was enough to yield £1m. And thousands of pounds had indeed been wagered on two, three or all four no-hopers. Even before Low Key romped home with a length to spare, the writing was on the wall: the bookies had been hustled. And it wasn’t hard to guess the culprit: Barney Curley, a 75-year-old Northern Irishman, former aspiring Jesuit priest, low-grade horse trainer and professional gambler, had once owned three of the four winners. Their current trainers were former employees of his Newmarket yard or otherwise associated with him. Betting on horses blessed with a sudden improvement in form was as much a Curley trademark as the beige fedora on his bald pate.

Bookies denounced a “weapons-grade coup”. One, Paddy Power, said it had lost nearly £1m; pundits speculated about losses of £15m for the industry overall, though the true figure was probably nearer £2m (bookmakers exaggerate such hits to play up punters’ chances). Yet as in previous Curley plots—and there have been four decades’ worth of them—none found a reason not to pay up. Part of the ingenuity of the schemes, part of the chutzpah, is the way they mix subterfuge with respect for the letter of the law. This was a heist, but a perfectly legal one.

Play it again, Sam

When it comes to landing wagers on unlikely horses, Mr Curley has form (“Schemes, coups, call them what you like,” he says, amused by the mystique that surrounds him). The template is simple. A horse with proven ability is purchased, often from overseas. It disappears for months or years, perhaps recovering from injury. When it finally competes, its performance is appalling. Because, in most low-quality races, faster horses are given additional weight to “handicap” them, losing badly can help a horse in future events by lowering its rating. On its next outing, the bookmakers (having never heard of the obscure horse) lure punters with prices of 20-to-1 or higher. Lo and behold, the nag rediscovers its form, beats a field of weighted-down stragglers and enriches its backers—ie, Mr Curley.

His first notable caper was in 1975, at Bellewstown, an Irish track more noted for its lovely setting than the quality of its racing. Mr Curley’s horse, Yellow Sam, had not finished above eighth in two years; it was carrying 10kg less than some of its rivals. Yellow Sam’s performance, however, was not Mr Curley’s only concern, or even his main one. The real worry was the odds.

The trouble with odds is that they fluctuate. Bookies adjust them according to the betting: lots of money placed on a horse will result in worse odds for the punter. Prices for horses swing like those of shares on a stockmarket. Betting shops will refuse to take a wager altogether if they get wind of a “coup”, and even in 1975 they already knew enough about Mr Curley to be wary.

He crafted a double-pronged strategy to befuddle them. A steady trickle of bets is harder to identify, and therefore counter, than a whopping IR£15,300 ($31,300) wager—the total amount Mr Curley put on Yellow Sam. So the first prong consisted of spreading his bets thinly, by having associates place them in hundreds of betting shops around Ireland rather than with the “turf accountants” at the track. That required serious organisation: dozens of “putters-on” from Bantry to Skibbereen and Ballymena, each placing IR£50 or IR£100 at around 150 betting shops in total, all within a few minutes of the race starting. “It was like a general massing his troops before battle,” Mr Curley recalled in his autobiography; “maybe a better analogy was a bank robbery.” A single loose lip would be enough to spoil the odds and foil the plot.

There was another risk to the odds, and thus to the operation. The prices used to calculate the winnings were those set by the trackside turf accountants when the race began. To prevent Yellow Sam drifting in from his original, lucrative odds of 20-to-1, it was vital that no word of the sums staked on him reached the course.

Thus the second prong of the ploy. Bellewstown had been picked not for its scenic appeal but for its antiquated communications: in 1975 a single public phone connected it to the outside world. A Curley man, Benny O’Hanlon—described by Mr Curley as “a balding, heavily built kind of fellow, a tough sort that you wouldn’t want to get into an argument with”—occupied the phone line in the crucial run-up to the race. The effect of holding off the trackside bookies for 25 minutes, with a rococo yarn about reaching a dying aunt in an invented hospital, was to short-circuit their prices. By the time he hung up, the horses were running, and the bookmakers could only watch in despair as Yellow Sam won by 2½ lengths.

Yellow Sam makes history

Sins of and against the father

A few betting shops prevaricated when it came to paying out the IR£306,000 winnings, worth £2.3m today and said to be a record at the time. Some settled in single punt notes to convey their displeasure. They were well attuned to skulduggery in racing, notably the risk of “ringers”, whereby a champion horse is run under the guise of an inferior one. But there was nothing illegal about the scheme. As for its mastermind: it helped Mr Curley recover from a bad run of bets, but that was almost an afterthought. Wealth is unimportant to him, he says in his gentle County Fermanagh brogue (rather less gentle in his famous trackside outbursts): it is worth much less than the satisfaction of gouging the bookmakers, a breed he holds in the lowest possible esteem. They bleed the sport of money, he argues; but the animosity has a personal tinge, too. “A small part of me”, his autobiography confides, “regarded the success of the scheme as some kind of retribution for what had happened to my father twenty years before.”

Charlie Curley, Barney’s father, had made good through a reputable grocer’s business and a less reputable knack for smuggling goods between Northern Ireland (where the family lived) and the Republic. It took a decade of betting on greyhounds to fritter away a modest fortune and then some. By 1956 he needed a big win to repay his debts. A last-ditch gamble involved a dog that had previously been “stopped” (made to run badly to lengthen its subsequent odds). Far from winning, the hound slipped and died mid-race, leaving the Curleys broke. At age 16 Barney was yanked from boarding school to help his father raise money. Like millions of penurious Irishmen before them, they crossed the Irish Sea to find work, winding up in Urmston, in Manchester’s industrial shadow.

Earning £20 a day each, it took the two Curleys a year of double shifts in a plastics factory to pay off the family’s debt. The time of sacrifice inspired Barney to become a priest upon his return to Ireland; he enlisted at a seminary in the hope of joining the Jesuits. He recalls those “halcyon days”, despite—or perhaps because of—the deprivations his training entailed. Ironically it was in the seminary that he was introduced to horse-racing, joining friends at outings to Limerick Junction racecourse. It wasn’t the horses that drew him from the church, however, but a bout of tuberculosis at the age of 22, which kept him at home for a year. He never returned to the seminary, though he still attends mass every day.

A motley string of occupations followed: smuggling razorblades and tyres across the north-south border; an insurance business in London (selling car insurance with no expectation of paying out claims); a perennially unprofitable pub in Omagh; pig farming. For a while Mr Curley’s most stable career was as a pop impresario, promoting bands in the wake of Beatlemania. One of his acts, Frankie McBride and the Polka Dots, cracked the British Top 20 chart in 1967. Handily, the jobs left a fair bit of time for betting—even, during one spell, for working as a bookie. He met his wife Maureen in 1968 at the track at Killarney (his account of their first encounter notes in detail the names and fortunes of the horses he backed).

Training and betting on horses became his life’s work. New tricks were developed to foil the bookies; most refused to take his bets. No matter, putters-on could always be found to cover his tracks. One ambitious scheme involved paying a British Telecom engineer he had befriended in a pub to knock out phone lines to the racetrack in Thirsk—a £1,000 investment that helped secure £80,000 in winnings on a 14-to-1 shot. By 1978 Mr Curley was worth IR£1.2m, according to court documents. In the early 1980s, after the Yellow Sam coup had made it near-impossible for him to bet in Ireland, he moved to Newmarket, a market town 60 miles north of London dominated by the horsetrack on its western edge. This was the golden age of racing, then the only sport on which gambling was allowed bar the football pools. Two of Britain’s four television channels broadcast races live. Mr Curley owned over 50 horses, some good enough to run in high-end meetings such as Ascot and Cheltenham. Even so, turning a profit from racing itself was tough. Making any sort of money meant betting, on the right horses at just the right time.

Brought to book

Mr Curley is respected as a trainer, albeit one whose success has mostly been at the lower end of the sport. “Curley has long been a master of extracting the maximum from the moderate—when the money was down,” says Nick Townsend, author of “The Sure Thing”, a book that details Mr Curley’s betting prowess. Yet repeated run-ins with the authorities stymied any hopes of joining racing’s establishment, which embraces Arab sheikhs and the queen.

Most sports have rules against participants wagering on their own contests. The idea of a football manager backing his team in some games but not others is far-fetched. Horse-racing is different: it is not so much a sport as an enterprise devised to give punters something to gamble on. In Britain, at all but the top, the prize money has long been insufficient to pay for the upkeep even of reasonably successful horses. Owners foot the bills on the promise of a fun day at the track, partly spent betting on their horses.

All the same, there are limits. Trainers and jockeys categorically must not bet against their own mounts. They must make every attempt to win every race they enter. Jockeys and their employers must “run a horse on its merits” or face the wrath of the British Horseracing Authority (BHA).

“Running a horse on its merits” and trying to win races are subtly different things, however. A mount best suited to a long, flat race can legitimately be entered for a short hurdle event, where it will struggle in the way Usain Bolt might in a marathon. An injured horse may well run on its merits but still end up dead last, so looking like a dud to bookies and handicappers. Only the trainer will know how well-suited a horse is to the conditions; whether it is race-fit; if it has improved since its last public outing. Using that inside information is firmly within the rules.

“Stopping a horse, laying a horse [betting against it and losing on purpose]: that to me is stealing,” Mr Curley says. But that is not the same as sincerely hoping a horse will win every time: “I have never made any secret of running the horses to suit me, not the people in betting shops.” On any given day, only he knows whether he is backing one of his horses.

Actually the BHA did once find him guilty of stopping a horse. In 2007 they concluded there had been a “deliberate attempt to conceal the true ability” of one of his mounts, Zabeel Palace, which was defeated by three lengths in an easy race in Nottingham. The panel found the horse had not been run on its merits; rather, it was “used in a preparatory way for another day”. Mr Curley was fined £3,000 and the jockey in question suspended for 28 days. Soon after, Zabeel Palace disappeared for two years. It beat long odds to win on its return.

The heist of a lifetime

Probably wisely, most British bookies now refuse Mr Curley’s wagers too; most offer unattractive odds on any horse even distantly associated with him. But while locking phone lines is no longer feasible, other ruses still work. Running multiple horses on the same day and betting on all of them to win, known as an accumulator, is one. Even with sophisticated risk models, bookmakers struggle to grasp the potential liabilities of compound bets. Just a few pounds placed in numerous betting shops—or, increasingly, online—can result in a jackpot, of a kind that would require suspiciously large sums to be put down on a single horse.

The trick, of course, is to get several horses to win on the same day. An attempt to pull off a multiple coup in April 2009 foundered when only two of five horses prevailed. The venture barely broke even. In May 2010 a superior plan landed three horses out of four (see chart), enough for an estimated payout of nearly £4m. Two online bookmakers, based in Gibraltar, handed over a reported £900,000 only after 21 months of wrangling.

That scheme paid out more because bookmakers failed to spot it until it was too late. By January 2014, speculation of a four-horse plot was all over the internet before the bets opened, pushing down the odds on Indus Valley, Low Key and the rest significantly. Still, that heist—which Mr Curley swears is the last of his 40-year career—was infinitely more satisfying. “Nobody will ever do it again!” he says.

Speaking at his home in Newmarket, he claims he has moved on: “the gambling, the horses, it’s really not that important in the grand scheme of things.” The stables are empty now. A giant St Bernard, Arney, growls at passers-by, and bites given the chance. Ashtrays overflowing with Silk Cut butts have been replaced by e-cigarette paraphernalia. It is a comfortable, middle-class life rather than a millionaire’s.

Mr Curley says he has not been racing in two years, with one or two exceptions. Nor does he miss it. Mr Townsend, the author, claims younger associates now oversee the nuts-and-bolts of the schemes. But even advising them is impossible at his age, says Mr Curley, who has announced his retirement several times before. “These things take three to four years to organise.”

His avowed lack of interest is slightly contradicted by a thumbed copy of that day’s Racing Post. He is keener to discuss Direct Aid for Africa, a charity he founded in 1996 following the death of his son Charlie in a car crash. Whatever he has made from horses has gone to finance schools and hospitals in Zambia, he says. Many of his projects are linked to Catholic missions of the sort he might have joined had he stayed with the Jesuits. He visits several times a year, health permitting.

Friends and critics both acknowledge his charity work. Beyond that, British horse-racing is split over Mr Curley. Plenty think his schemes inject colour at a time when the sport badly needs it. Football long ago displaced racing as the betting man’s main pastime. Racing is declining, particularly in its lower echelons; these days, dwindling audiences are drawn as much by the catering as by the horses. To his fans, Mr Curley is a Robin Hood figure who fleeced greedy betting chains, in coups that livened up otherwise dreary races. Yellow Sam’s victory at Bellewstown is its only famous race. The horse has a bar named after it.

Critics say that, legal or otherwise, his schemes have besmirched a noble sport. “Barney Curley is a hero to many,” says John McCririck, a pundit. “But the loser in all this is the punter. Racing shouldn’t be run like that.” Mr Curley’s heists may be inimitable, but that doesn’t stop people trying: by one estimate well over 50 outfits have had a go.

For their part the bookmakers are surprisingly good-natured about him. His antics demonstrate their fallibility, which is a fine way to attract punters. The likes of Ladbrokes and William Hill have diversified away from horses anyway. Step into one of their high-street shops nowadays, and the action will probably be dominated not by Ascot or Newmarket but by gaming terminals. Often the only horses run in “virtual races”, where customers bet on imaginary, computer-generated jockeys riding imaginary mounts. Punters have no need to study a horse’s form, the firmness of the ground, or the look on the jockey’s face at the starting gate. The 20-to-1 shot wins as many times as, mathematically, it should. It is all utterly charmless, but at least you don’t have to wonder if Barney Curley ever owned any of the runners.