PURE luck enabled police to catch the Real IRA cell responsible for the UK's worst mainland bombing campaign in a decade - just as they were about to commit another atrocity.

Undercover customs officers had been investigating suspicious deliveries of red diesel in County Durham for three months before the raid on a crumbling farmhouse at West Ardsley, near Leeds.

They were looking for evidence linking the North-East deliveries with a scam in which red dye is taken out of duty free industrial fuel and sold at forecourt prices.

What they found led police to another farm only a mile away, where a car was being readied for another bomb attack by the Real IRA. To this day, intelligence chiefs have no idea where the terrorists intended to strike.

A forensic search of the farmhouse turned out to be an Aladdin's cave for anti-terrorism experts searching for the cell that had already carried out three bombings - two in London and one in the West Midlands.

They uncovered five sets of fingerprints and a box which had once contained a mobile phone. Carelessly, one member of the group had discarded the box with the sales receipt still inside.

This information enabled detectives to establish that the same phone had been used to warn police before the third bomb - in Birmingham - had detonated.

Suspicions now centred on two men who had worked at the diesel "washing" farm - brothers Robert and Aiden Hulme. Robert Hulme had fled the scene as soon as he realised customs were on to the operation.

He probably would have slipped away had he not made an elementary mistake.

In his haste to flee the mainland, Hulme had bought a ferry ticket from Liverpool to Ireland over the phone and used the farm's address. When he tried to board the ship, police were waiting.

Somewhere en route to Liverpool he had swapped clothes and ditched his old car.

When police recovered his old vehicle they found a phone covered in Aiden Hulme's fingerprints. Messages sent after the explosion that rocked Ealing, in London, read: "Up the Provos" and "What were you at last night?"

The other three members of the cell - whose fingerprints had been recovered from the farmhouse - were all arrested over the next few days. In April, they received sentences ranging from 16 to 22 years at the Old Bailey.

Robert Hulme, 23, who was described as one of the leading figures in the plot, was jailed for 20 years. His older brother Aiden, 25, received a similar sentence.

Customs officers who arrested Robert Surtees, Peter Brown, and Allan Aggett, for their role in the diesel scam, said they had no proof that that it had helped to fund the terrorists.

It is not known whether Surtees, Brown and Aggett had any idea that the two Irishmen who worked on the farm were members of the Real IRA.

Over eight months, supplier Martin Simpson, from Butterknowle, Teesdale, unwittingly delivered 4.3 million litres of red diesel to Surtees at Standalone Farm, Chilton, County Durham. Mr Simpson said he had no knowledge of the subsequent laundering operation and has offered to pay his £15,000 profit to the Treasury.

Surtees pumped the fuel into a tank, which had a capacity of about 17,000 litres. Peter Brown, from Hartlepool, picked it up and delivered it to Manor House Farm, at West Ardsley.

Allan Aggett transferred it to a 30,000 litre tank. The oil was cleaned using acid.

The end product, closely resembling Derv but only detectable by experts, was then sold to retailers all over the country as genuine diesel.

The gang offered it for sale at a highly competitive price, usually one or two pence below market price. That still allowed them to make more than 50p profit on every litre. Customs believes they made more than £2m.

Chris Harrison, assistant chief investigation officer said: "It was the most sophisticated laundering operation we had ever seen. It was a very successful operation and it would have got greater had it continued on a long-term basis."

The same could have been said for the Real IRA cell, had it not been stopped by a bit of luck and a lot of hard work.