Australia's sprinters ended a decade-long drought in the 4x100m freestyle relay in stunning fashion, upsetting France and the US to claim gold on the opening night of the world championships in Shanghai.

The victory was highlighted by a brilliant 47.49-second lead-out from promising 20-year-old James Magnussen, the fastest ever 100m swim in a textile suit, before veteran Eamon Sullivan brought it home in the final leg.

Matt Targett and Matt Abood also got the job done as Australia were never headed, finishing in 3:11.00 to edge out France (3:11.14) and the Michael Phelps-led US (3:11.96).

Australia's male sprinters had spoken earlier this year of their desire to return to the nation's glory days in relays, having not won a major international 4x100m freestyle title since the 2001 world championships in Fukuoka.

And they now have their sights on a first Olympic 100m freestyle relay gold since the famous win in Sydney 2000, led by Ian Thorpe and Michael Klim.

"We've been working towards this for a long time," said Sullivan, who was considered by some as a surprise selection to swim in the final after young gun James Roberts impressed in the heats.

"We haven't made it too public but deep down this is what we have wanted for a long time.

"With guys like Maggie (Magnussen), James Roberts, they are only 20, it gives us a great opportunity for next year.

"We want to repeat Sydney (in London). We've got the talent. We've got the experience."

Magnussen blew American legend Phelps out of the water in an opening leg which signalled his credentials for gold in the 100m individual event.

His swim was all the more remarkable considering he hadn't been able to train for two weeks after he was struck down by a bout of pneumonia.

"I was pretty stoked with that, I haven't been in the water for a couple of weeks and hadn't really fully tested my speed, so I was a little bit cautious," he said.

"But it was a big thrill to get out there in front of a big crowd and do the job."