Four years before the Wright brothers conquered the skies, a British inventor almost beat them to it. But days before his first attempt at powered flight, Percy Pilcher died in a gliding accident, his design untried. A century later, Oliver Burkeman sees his triplane brought to life - with the help of a Fanta bottle and a few chainsaw parts - and finds out how close he came to making aviation history

Percy Pilcher's life ended on September 30 1899, when he was 32, as the result of a rapid and unforeseen reduction in the distance between his homemade wooden glider, the Hawk, and the well-kept lawns of Stanford Hall in Leicestershire. Until that moment, the atmosphere among the moneyed gentlemen gathered to watch him must have been one of high anticipation: Pilcher's display, in what he called a "soaring machine", was the final fundraiser for a project so revolutionary that it promised to make him one of the most famous men of the coming century.

For years, the race to design a motor-powered aeroplane had obsessed professionals and eccentrics across Europe and America; now Pilcher announced that he was days from completing one - all he needed was a bit of cash to fix its broken engine. But then, on his third flight at Stanford Hall, the Hawk "came down heavily", in the words of one aristocrat in the audience, the Honourable Adrian Verney-Cave, "with a crash that could be heard some hundreds of yards". Two days later, Pilcher died. Four years later, on December 17 1903, Orville and Wilbur Wright coaxed their own biplane jerkily upwards from a North Carolina field and into history.

Almost accomplishing a pioneering feat, then failing utterly but honourably at the last minute, has generally been a reliable way to achieve immortality in Britain. But Pilcher wasn't destined for a fate like Captain Scott's. All but a few scraps of his plane vanished, his diagrams vanished, and just about the only thing left was a question: if it hadn't been for a gliding accident, would the world's first aeroplane have been invented by a Briton? Discovering the truth - unearthing Pilcher's design, rebuilding it, and ultimately trying to fly it - was to take most of the past quarter-century, along with several TV crews, tens of thousands of pounds, a historian who wouldn't let the matter drop, and an aviator from Wiltshire with a high regard for unusual flying machines and a low regard for the risk of death. They got their answer a few weeks ago, just off junction 13 of the M1, a few miles outside Milton Keynes.

"My hang-gliding instructor wasn't formally trained in anything aeronautical - he was more of a loft-conversion chap, really," says Bill Brooks, a slight man in his forties with unkempt hair and a fiercely animated way of talking when the subject is flying. Brooks works for Pegasus Aviation, near Marlborough, where he designs and builds cutting-edge light aircraft when he isn't reconstructing historical ones. "I remember flying one of his machines where I took off and discovered that I could only turn left. I was scared as anything that it was going to start spiralling." He grimaces: "Simple things like that can kill you."

Pilcher's mentor, the German flight pioneer Otto Lillienthal, died when his glider lost speed, stalled, and plummeted. Brooks's instructor was killed in a similar fashion, on an English hillside, probably when the engine of his microlite cut out. In this respect, not much seems to have changed in lightweight aviation: the possibility of swift death is just as real, and the pilots who survive are as stubbornly unfazeable as Pilcher, who seemed to take Lillienthal's death as a challenge. "It shook me up," Brooks says of his own tutor's crash. "But after that I had a good look at what he made, and built my own version. I ended up flying that machine for 80 or 90 hours." He doesn't seem to get scared. "Right now," he says, "my father is dying of prostate cancer, and he's fading away. I'd prefer a dive into the ground from 50ft any day compared to that."

Brooks had always been ready to risk his life in what aviation experts call "marginal" aircraft - "dangerous" seems to be an approximate non-technical synonym here - but rebuilding Pilcher's machine first required the detective work of Phillip Jarrett, a meticulous aviation historian from Dorking who had been burrowing away at the mystery for years. This much was easy to discover: Pilcher had been a naval cadet since the age of 13, where he was disciplined for offences including "not wearing drawers when the order [was] given" and "breaking a tea cup and two saucers in mess room while skylarking". He had left the navy to become a marine engineer, started tinkering with gliders, and built several well-known models with names such as the Gull and the Beetle and the Hawk. But then the trail began to fade - until the early 1970s, when Jarrett finally discovered fragments of Pilcher's correspondence in two American collections.

The picture that emerged was of a man in a crisis. At a time when some inventors were still jumping off hillsides with feathered wings strapped clumsily to their arms, or trying to propel themselves upwards by means of giant umbrellas, Pilcher had mastered the concept of lift, the way that the flow of air around wing-shaped structures keeps aeroplanes aloft. But a powered plane would need to lift a whole internal combustion engine. More lift required more wingspan. But more wingspan would require wings so vast that they couldn't be supported by the plane's fuselage in the first place - a vicious circle. Pilcher was stuck, Jarrett explains, until he received a letter from a fellow innovator, an American named Octave Chanute, (Odd names seemed to be something of an entrance qualification for plane designers at the time; excellently, one of Percy Pilcher's friendly rivals was Augustus Herring).

Chanute had the answer: stack two or more wings on top of each other and you massively increase the lift without placing an unbearable strain on the craft. "I've always hated people who speculated wildly on things, so this was an alien activity for me," Jarrett says - but by 1978, he had published an article complete with detailed diagrams of Pilcher's putative triplane. Its primary materials had been pieces of pine, three quarters of an inch thick, sailcloth, and sticks of bamboo. It was, to put it mildly, "marginal".

Jarrett never expected to see it fly. "I thought," he says, "that that was as far as we would go."

If you travel east from Milton Keynes, into the furthest, semi-rural fringes of the London commuter belt, it takes barely 25 minutes to reach Cranfield University. A tiny, slightly desolate outpost stranded amid arable fields, Cranfield is home to a handful of academic and residential buildings, a branch of Costcutter, and the Boyz-2-Men gentlemen's hairdressers. The miniature Waterstone's barely has enough space to stack the latest bestsellers, but its well-stocked reference sections provide a clue to the institution's specialisms: the titles on the aeronautics shelf include Why Airplanes Crash, The Ballooning Manual, A History of Aircraft Lubricants, 101 Things To Do With Your Private Pilot's Licence, and a thick tome called Helicopter Theory. Cranfield also has an airfield, which made it a natural choice for TV6, the London production company which last year became the latest - although by no means the first - to decide to try to bring the Pilcher triplane back to life.

"The first thing you want to make sure with these TV companies is that they're not cranks," says Ian Poll, Cranfield's bright-eyed, bearded professor of aeronautics. "This time they actually offered us a budget to do it with, so that was a very good sign." He is standing in a small hangar below the main floor of the school of aeronautics, immediately beneath a huge inflatable safety slide descending from the mocked-up fuselage of an Airbus A380 passenger plane. (Poll's colleagues are using it to investigate how to stop fewer people injuring or killing themselves during airliner evacuations. Outside, on the airfield, a student is making two-foot-high hops in a helicopter.) "Still, to be honest," says Poll, "I couldn't see how it would work. Pilcher's craft was foot-launched, and short of running so fast that you'd need to be injected with performance-enhancing drugs, I didn't see how it could work."

This proved to be only one of many problems with reconstructing Pilcher's plane from Jarrett's plans. By far the most mysterious aspect of the aviator's original design were the large triangular cutouts along each of the three wings - which significantly reduced wingspan, and therefore lift, and therefore the chances of getting off the ground in the first place. "This was something Chanute did with his wings," says Jarrett. "So I think it was just slavish copying of Chanute." Besides puncturing the myth of Pilcher as a genius, the bizarre copied cutouts posed a dilemma that was to recur: when was it all right to assume that Pilcher, had he lived, would have made a modification to his design? "Pilcher would have decided within the first couple of days that these cutouts were bonkers," says Brooks, who has commuted for the day in his own light aircraft.

There is less agreement on the question of the engine, a lightweight six-horsepower device adapted from chainsaw parts, and originally intended to power Swedish go-carts - Pilcher's original was only 4hp - but a decision, if hardly a disinterested one, was reached in favour. Aided by Cranfield students and a specialist subcontractor, the triplane, built of spruce and light enough, at 48kg, to lift, began to take shape. The first tests on the completed replica didn't involve leaving the ground. Cranfield staff propelled it along horizontally, holding on to each wing. "Then we had one run where the people on the wing-tips said, 'I wasn't doing anything,'" Brooks recalls. "And that was the point at which I thought: we've got a flying machine."

It is far too windy to see the plane in flight today - or probably any time until next summer - but as Brooks wheels it out into the Cranfield car park, complete with anachronistic Fanta bottle as fuel container, it attracts rapt attention none the less. "Planespotters," Brooks sighs. "Strange people, but ultimately harmless."

The first attempt at flight took place on a slightly too breezy day at Cranfield in August. It was a success, in that the plane left the ground, and it was a failure, in that a gust of wind caught it at the wrong angle and sent Brooks tumbling to earth onto the right wing. "And that was my crash," recalls Brooks.

"I think someone said, 'Oh, bugger,'" Ian Poll says.

"Yes," says Brooks. "I think it was me."

The repairs didn't take long. The bigger worry was always going to be the weather, and Poll still looks surprised when he remembers how perfect the weather was - almost completely still, with only a breath of a breeze - when the film crew showed up again. The Cranfield Pilcher Triplane didn't just fly: it flew for a minute and 25 seconds, beating by 26 seconds the longest flight made by the Wright brothers on the day they invented powered aviation.

"Magical, magical, wonderful," is all Brooks can say at first when he thinks of the moment he achieved a steady altitude. "Pilcher deserved to see that." "It was quite something," says Jarrett. Ian Poll uses the word "magical", too.

"I can remember two things," Brooks says afterwards. "One is that there was a pair of seagulls off to the right-hand wingtip that were looking at me, going along at exactly the same speed. The other one was that as I was flying across the airfield, I could see rabbits and things running about in front of me. I only landed at all because there's a little house there, the only one on the airfield - the old farm. If I'd carried on much longer I'd have landed in his garden."

· Horizon: Percy Pilcher's Flying Machine is broadcast on December 11 on BBC2