The United States swimming star Michael Phelps kept his world championships on track as he fought back in a "deadly field" to reach the final of the 200 metre freestyle.
It has been a slow start for the 14-time Olympic champion, part of the US team that crashed to defeat at the hands of Australia in the men's 4x100m freestyle relay on the opening night of pool action.
And Phelps, swimming next to teammate and rival Ryan Lochte in the 200 metre freestyle semi-finals, looked in danger of missing out on the final as he battled a powerful field also including defending champion Paul Biedermann.
But Phelps found an extra gear in the last 50 metres to qualify fifth fastest for tonight's final in a time of 1 minute 46.91 seconds, 1.29 seconds behind Yannick Agnel of France, who swam in the other semi-final.
The American, who won eight gold medals at the 2008 Beijing Olympics, says his only aim had been to reach the eight-man decider in what he described as a 'deadly field'.
Phelps could still claim up to six gold medals in Shanghai.
The American is into the final year of his stellar career with everything now geared towards his swansong at next year's London Games, which will be his fourth and last Olympics.