Updated

By Nick Mulvenney

MELBOURNE (Reuters) - Roger Federer summoned up his very best tennis to see off inspired Frenchman Gilles Simon over five sets on Wednesday and reach the third round of the Australian Open on a day of scares at Melbourne Park.

On another cool day at the year's first grand slam, there was a major fright for injured Venus Williams and minor wobbles for Novak Djokovic and Maria Sharapova.

Defending champion Federer came face-to-face with the real possibility of his earliest grand slam exit since the 2003 French Open before finally overcoming tiring baseline hustler Simon 6-2 6-3 4-6 4-6 6-3.

Three days of tennis had almost been completed without a single upset of note and the early exchanges indicated that it would not come in Wednesday's final match on Rod Laver Arena.

Federer breezed through the first two sets in 68 minutes before Simon, a notoriously slow starter, finally got into his stride and showed why he is one of only three active players to have a winning record against the Swiss.

A former world number six only now getting back to full speed after knee problems, Simon raced around the court to chase down Federer's best shots and return them with interest from both sides.

Federer was clearly rattled but embraced the challenge and upped his own pace to break for 4-2 in the final set before taking his place in the third round with an emphatic ace after three and a quarter hours.

GOT LUCKY

"He's a great player first of all, so matches against him don't come easy," said Federer, who beat Simon for the first time in three meetings.

"It was great to play against him, I really enjoyed myself out here tonight. I remained positive and I said 'I've worked hard my entire life, it's gonna pay off' and look, today I got lucky, I was happy I won and I'm still in the tournament."

Simon cursed his luck at having met Federer so early in the tournament and admitted he had tired in the fifth set.

"I had to run everywhere for three hours," he said. "There are not too many players who can play longer than me, but Roger is one of them."

Serbian Djokovic, the men's third seed and champion here in 2008, was also forced to scrap it out with little-known Ivan Dodig on the Hisense arena before prevailing 7-5 6-7 6-0 6-2.

Dodig's dogged returns forced Djokovic out of his baseline comfort zone and the first two sets were a tight contest that culminated with the Croatian roaring in delight at his victory in the tiebreaker to level the contest.

That was the extent of the world number 81's challenge, however, and Djokovic took control of the contest to set up a third-round meeting with compatriot Viktor Troicki.

"I was challenged, pushed to the limits in the first two sets," said Djokovic. "Definitely wasn't my best. But in third and fourth it was okay."

Williams, returning to action here for the first time since last year's U.S. Open, was severely hampered by a strained muscle but still managed to scramble a 6-7 6-0 6-4 victory over Sandra Zahlavova.

BITTER END

The seven-times grand slam winner took a medical timeout after losing the first set tiebreak and then gritted her teeth to grind out a victory in a shade over three hours.

"It was really tough," said Williams, flying the family flag alone this year in the absence of injured 2010 champion Serena.

"You've got to be able play in all circumstances -- good, bad strange, weird, bizarre. I haven't retired from a match in a long time. I have to go to the bitter end."

Top women's seed Caroline Wozniacki earlier looked in fine fettle as she took just 58 minutes to overpower American Vania King 6-1 6-0.

"I definitely felt like I was playing good tennis today," 20-year-old Wozniacki said, adding: "I believe that I'm a really good player, I can beat anyone on a good day."

Justine Henin, seeded a lowly 11th, was shaking hands with the umpire on Rod Laver Arena moments after Wozniacki clinched her win, having put Briton Elena Baltacha to the sword 6-1 6-3.

Sharapova survived an early scare to rally to a 7-6 6-3 victory over France's Virginie Razzano, the 2008 champion raising the decibel levels as well as her game.

"It was my first time to play her and I didn't know she cried like this," Razzano told Reuters, referring to Sharapova's deafening shrieks. "It was difficult but I got used to it."

Vesna Manasieva prevailed 3-6 6-3 6-0 in another Franco-Russian encounter against Marion Bartoli, the French 15th seed the highest ranked casualty at the tournament so far.

Men's former world number five Tommy Robredo also registered something of an upset with a 1-6 6-3 6-3 6-3 victory over American 16th seed Mardy Fish.

(Editing by Pritha Sarkar)