Forty years ago this week, a British scientist named Donald Davies unveiled one of the great technological ideas of the 20th century. He called it 'packet-switching', which must have sounded odd at the time because it was a way of enabling computers to communicate with one another. But it turned out to be the basis for all modern digital communications and it's the technological foundation on which the internet is built.

Davies was working at the National Physical Laboratory at Teddington and had been frustrated by the fact that while the telephone was satisfactory for voice communications it was hopeless when computers needed to exchange data. The telephone network in those days was a 'circuit-switched' system - so called because it used a sequence of 'switches' (that is, telephone exchanges) to set up a circuit between caller and respondent. Thus, if a reporter called The Observer from Munich, the call was set up as though a single piece of wire stretched from his hotel room in Bavaria to the paper's newsdesk in London.

This worked for voice conversations, where activity on the line is pretty constant, but was incredibly inefficient for computers, which are digital devices, communicate only in short bursts and are silent for much of the time.

Davies envisaged a radically different system. Firstly, it was all-digital (whereas the phone system was analogue). All communications would be broken down by the originating computer into multiple 'data packets' and enclosed in a virtual envelope giving the addresses of sender and destination, plus an indicator of where the fragment fitted into the overall message. Each packet was then launched into a new kind of network: a mesh of permanently connected digital switches called 'routers'.

A router would inspect the destination address on each envelope as it arrived and then quickly dispatch it to another router that it judged to be in roughly the right direction. This game of pass-the-packet would then go on until the packet reached its destination, where the receiving computer would extract packets from their envelopes and reassemble them into the original message.

If all this sounds tedious, then that's because it is. But computers are very good at this stuff, and they never tire. And they get faster and cheaper every year. Davies's great insight was that a packet-switched network could be efficient, fast and resilient, and he and his colleagues at NPL began building a local area network that implemented his ideas.

Later that year, they gave a paper on their work at an academic conference in the US. In the audience were a number of engineers who were designing a computer network - the Arpanet - for the US Department of Defence. These guys had a clear idea of what kind of network they wanted, but were less clear about how it would work. Once they heard the British presentation, however, they knew.

But here's the funny bit. Ten years earlier, an American researcher named Paul Baran, who worked for the Rand Corporation, had been pondering the problem of designing a resilient communications network for the Pentagon, and he had also hit on the packet-switching idea. But because the notion of packet-switching was anathema to AT&T, the US telephone monopoly, Baran had made a personal decision to withdraw his proposal to build an experimental packet-switched network. He knew that the Pentagon would give the contract to AT&T, and that AT&T would make sure it didn't work. So he buried it.

So who invented packet-switching? The answer is that Baran and Davies did - but independently. They thus join the long list of co-discoverers that characterises the evolution of Western science and technology. Charles Darwin and Alfred Russel Wallace independently discovered evolution by natural selection. Newton and Leibniz both invented calculus. James Watson and Francis Crick got to the structure of DNA just a whisker ahead of Linus Pauling. The New Yorker writer Malcolm Gladwell, who is about to publish a book on these 'multiples', says that the story is repeated in the origins of colour photography, logarithms, and a host of other cases.

There are two lessons in all this. The first is that, at any given time, various powerful ideas are 'in the air'. If Davies hadn't come up with packet-switching in 1968 then someone else would have, because lots of clever engineers were pondering the computer-communication problem at the time. Or someone at the Pentagon would have looked up Baran's work and the penny would have dropped. That's not to belittle the achievements of Baran and Davies, or to deny them the credit that they are due: it's just the way these things work.

And the other lesson? Never entrust the future to a telephone company.