Gwangju - American great Katie Ledecky said on Thursday a late-night text from Michael Phelps boosted her spirits after she pulled out of the defence of her 1 500 metres freestyle world title final with health issues.
After her shock withdrawal - and two days of bed rest - the five-time Olympic champion returned to the pool to pull off a strong second leg in the women's 4x200m freestyle which the United States lost to Australia.
The 22-year-old she was "95 percent sure" she would be back Friday to defend her 800m crown.
Ledecky put her recovery down to drinking and sleeping plenty, but admitted that a message from legendary compatriot Phelps pepped her up.
"He texted me a couple days ago and was kind of just like, 'What's up, are you okay?' That meant a lot," she said.
"I think I got that text in the middle of the night when I was having one of those sleepless nights."
Ledecky has dominated the 1 500m event at the past three world championships, but despite posting the fastest qualifying mark in Gwangju, admitted she had seriously struggled in her heat.
"I got to the 1100 point of the 1 500 and I almost stopped and got out," she said.
"I just kind of blanked out the rest of the race and tried to finish it, which I did, and got over to the coaches and medical staff," added Ledecky, who was at a loss to explain her ill health.
"I was just feeling the effects of dehydration, loss of appetite, lightheadedness - just kind of created the perfect storm that pulled me out."
Ledecky lost her 400m world title to Australian teenager Ariarne Titmus last weekend in a stunning opening-day upset.
"I wouldn't have pulled out if it wasn't serious or if I wasn't concerned and scared and worried about my health," she said.
Ledecky revealed she only returned to the pool on Wednesday night, when she was closely monitored by team officials.
Despite her return to form in the relay, Ledecky and the Americans were edged out by a strong Aussie side who powered their way to gold in a world record seven minutes, 41.50 seconds.
But the United States also dipped under China's old mark.
"That felt good," said a relieved Ledecky.
"It was just really good to be back with the team today, just be around people and get in a race and put together my best swim."