(CNN) -- She had nightmares about taking part in the New York City Marathon -- in one she even dreamed she was dead prior to getting to the start line -- but it turns out Caroline Wozniacki need not have worried.
For one the tennis ace from Denmark completed the grueling 26.2-mile journey Sunday, which was impressive enough given only about a week ago did Wozniacki's lengthy season come to an end in Asia.
Secondly the former world No. 1 posted a time of just over three hours and 26 minutes.
Wozniacki tweeted the secret to her finishing was "carb loading," posting a picture of herself munching mountains of popcorn, while watching the New York Rangers play ice hockey against the Winnipeg Jets with friend Serena Williams on Saturday.
Waiting for her at the finish line was Williams, who just happened to beat Wozniacki in the U.S. Open final in New York two months ago.
"I never tried anything this hard," Wozniacki was quoted as saying by the New York Daily News. "This is the toughest physical challenge ever.
"You have to keep going, keep going. I just kept grinding out there."
It was always on Wozniacki's "bucket list" to run the marathon and she raised funds for the charity Team for Kids.
Despite Wozniacki's athletic background, the race didn't go down without a hitch. She hit a wall, said the Daily News, at the 20-mile mark.
But the 24-year-old -- formerly engaged to golf No. 1 Rory McIlroy -- ended strongly and was congratulated by Williams.
Her feat also drew praise from fellow players and retired greats such as Billie Jean King.
Wozniacki said completing the marathon would help her tennis game.
"I know I can be out there for hours and be fine," she was quoted as saying by the Daily News. "I can keep battling it out there and I think that's a great mental advantage to have when you go out to play."
Presumably, though, she'll take a break first.