The name was never meant to stick. When Doug Engelbart and his team at the Stanford Research Institute in California designed a computer controller encased in a carved-out wooden block, with wheels mounted on the underbelly, one researcher nicknamed it a 'mouse'. 'We thought that when it had escaped out to the world it would have a more dignified name,' Engelbart recalled later. 'But it didn't.'

Engelbart's invention became the mouse that soared, an essential piece of computer hardware. Its 40th birthday will be celebrated next week when Engelbart returns to Stanford (now known as SRI International). The mouse was first shown to the world when he gave a presentation of a working network computer system in San Francisco on 9 December, 1968, which is still revered as 'the dawn of interactive computing'.

Yet in one sense Engelbart, now 83, was far ahead of his time. He never received royalties, partly because his patent ran out just before the tech revolution that saw the computer and mouse supplant pen and paper. Now the mouse faces growing competition from a new generation of touchscreens.

Engelbart first started making notes for the mouse in 1961, after deciding that he could do better than the standard gadget, a light pen which had been used on radar systems during the Second World War. 'We had a big heavy tracking ball - it was like a cannonball,' he said. 'We had several gadgets that ended up with pivots you could move around. We had a light panel you had to hold up right next to the screen so the computer could see it. And a joystick that you wiggle around to try to steer things.'

One of Engelbart's collaborators, Bill English, built an 'x-y positioning device' made from a wooden shell with wheels and a connecting cord, or 'tail', at the back. The cord got in the way when it was used, however, and so it was moved to the front. 'We set up our experiments and the mouse won in every category, even though it had never been used before,' Engelbart recalls on his website. 'It was faster, and with it people made fewer mistakes. Five or six of us were involved in these tests, but no one can remember who started calling it a mouse. I'm surprised the name stuck.'

Xerox developed the mouse during the Seventies and launched the first commercial product with the Xerox Star computer system in 1981. It failed to take off, but when Apple bought the mouse patent for its Macintosh in 1984 success was assured, and it was eventually taken up by the mass PC market for use with Microsoft Windows.

By then Engelbart's patent had expired, meaning that he missed out on a potential fortune, although later mice used different mechanisms which could have been claimed not to infringe the original patent if the matter had ever gone to court. The Stanford Research Institute licensed the mouse to Apple for just $40,000, according to the book Inventors and Inventions, published by Marshall Cavendish, which tells how in 1989 Engelbart lost both his laboratory and his house - the latter burnt down while he and his family stood outside helpless. But together with his daughter, he set up the Bootstrap Institute to promote his ideas, and in 1998 he was awarded the National Medal of Technology by President Bill Clinton for 'creating the foundations of modern computing'.

The mouse now faces unprecedented competition. Laptops which make no use of a mouse are an increasingly popular alternative to desktop computers for workers on the move. Apple's popular iPhone and Nintendo's Wii have shown the potential for touchscreens and movement sensors. HP is pushing a mouse-less TouchSmart PC. Microsoft has invested millions of dollars in a coffee table-shaped 'Surface' computer which responds to natural hand gestures, touch and physical objects.

Splendid, a digital innovations agency in London, is one of the first companies to adopt Surface. Paul Bishop, its managing director, said: 'It's much more collaborative and natural and people find it very intuitive.' Steve Prentice, an analyst at Gartner Research, also predicts the mouse's demise.

'I very much doubt that we'll be using the mouse in 40 years' time,' he said. 'They will be still be around in four or five years, but will they be the standard we see today? We're starting to see more complex and intuitive controls develop and the mouse will be left behind.'