BARNEY CURLEY is a genius.

He has taken the mug's game and made millions. He has taken the mug's bet and by some divine alchemy changed it into a way to relieve the bookmakers of more than £5m in two coups in barely four years. Barney Curley is showband manager, nightclub owner, philanthropist, horse trainer and, always and to his core, a punter. Barney Curley is an enigma and a story.

His first major coup, in 1975, revolved around stopping the bookmakers communicating from the course. At Bellewstown in Ireland, this was achieved by merely placing a large man in the only telephone box there.

However, his coups in 2010 and in January of this year were things of beauty, the coming together of precise planning, deep knowledge and extraordinary nerve. "He is bold," offers Nick Townsend, Curley's biographer, who has written the sensational story of the 2010 coup.

It was planned over years and involved maps detailing the precise location of the bookmakers to be targeted in London, an army of willing helpers, folding bicycles and a computer expert who showed how the mug bet could make fools of the bookies.

Its genesis was Curley's realisation that he would find it impossible to win large amounts of money on a single runner. Curley's history of successful bets had made bookmakers very cautious when one of his runners was entered in a race. Their reaction was almost hysterical when a bet was placed. The price tumbled like a striker in the box. Curley had to come up with a different plan.

"It was an extraordinary gamble," says Townsend. "A trainer like the late Henry Cecil could produce four horses to win on a day but they'd be at short prices. Barney had to produce, or be involved with, four horses that would win at huge prices."

Curley laid out a motley crew for the biggest tilt ever at the bookmakers. On May 10, 2010, Agapanthus, Savaronola, Sommersturm and Jeu De Roseau were entered in races. They were hardly equine superstars.

"One of them had not won a race before and they were all relatively cheap. One was given away for 1000 quid because Barney could not do anything with it," says Townsend. Three of them were trained by Curley and the other by his friend Chris Grant.

A group of punters had been recruited and gathered in London and in Ireland. They methodically and carefully placed a series of Yankees (a combination of doubles and trebles) and trebles. These accumulators are greeted by the bookies in the same manner as a dieting spider views a rather plump fly. The proceeds from Yankees form the thick lining of the corporate bookmakers' satchel.

The punters were told to take an ante-post price with small bets that would not alarm staff in the shop. Three of the horses won and Curley won £3.9m. His most favoured horse, Sommersturm, was beaten, saving the bookies from a payout of £15m. "There's a warning right there to the punter because what was regarded as the certainty did not win. There is nothing certain in racing and they could not find a reason why it ran so badly," Townsend says.

"The first coup at Bellewstown was worth about £250,000, a massive amount of money in 1975. But that was planned because he was in dire financial straits. The 2010 coup was designed because he loves a challenge. He enjoys the buzz, the thrill, though he does not get excited. You could observe Curley watching a race where he won or lost six figures and you would not know."

The pay-off - apart from the £3.9m in 2010 and the £2m in January - is a sense of satisfaction that borders on the deeply spiritual. Curley, from County Fermanagh, is a religious man. Educated by Jesuit priests and trained for the priesthood, he ultimately walked away from a life in the church and managed showbands, smuggled goods across the border and became involved in horses.

He was once prone to the odd extravagance. He bought a Georgian mansion, had a Mercedes with a personal number plate and indulged in show jumping. Business ventures were not spectacularly successful. "I've had to keep punting because I have never been involved in a business venture where I didn't lose my tonsils," he once reflected.

More dolefully, he has also said of his punting exploits: "If I'm honest, I feel I have wasted my life."

This, then, is a thinker with an examined life, a punter who knows that winning big has but a momentary satisfaction. Townsend says of his subject, who has been involved in tempestuous rows over most of his 74 years. "He has regrets. He does put his hands up to not always getting things right."

As a long-term confident, though, Townsend has the inside information on the ultimate punter. "The first impression when you meet him is that he can be slightly intimidating," he says of the character whose bald pate is generally covered by a fedora and who once could not be seen without a cigarette dangling beneath his toothbrush moustache.

"He is impassive. He looks deep into you as if to sum you up immediately. He tests you out and his greatest test is loyalty. You are not partly on the team. You are on the team or you are not on the team."

Curley attracts devotion. The army of volunteers who put on the bets in 2010 were mostly working for expenses yet never whispered a word of the plan. This meant the bookies were left vulnerable. "I stayed the course because I was a watcher not a listener," says Curley.

His winnings now help fund his charity, Direct Aid For Africa, which seeks to improve educational standards in Zambia.

There may sizeable help now on its way after the coup on January 22 when four horses that were well backed in doubles, trebles and accumulators won in a re-run of May 10, 2010. None of the winners had won since 2010 and two had not raced for more than a year.

The genius, of course, is just not winning the money, but keeping it. Curley and his associates had picked horses whose performances could not be questioned as to substantial improvement because they were either well-handicapped or had not raced for some time.

They were then placed in poor races. The bookies could bleat but they could not withhold money - some tried - on the grounds of any criminality. Curley won this war and has retreated for the moment with substantial spoils.

The battle between bookies and punter reaches a fever pitch at the Cheltenham Festival this week, with the first skirmish this afternoon.

Curley will watch with interest. The major layers will have their intelligence agents scouring the scene for any evidence of a punt from their nemesis. Curley is likely to hold his fire and choose his ground. This is his talent, his gift, his genius.

n The Sure Thing by Nick Townsend is published by Century, £20