Serena Williams pulled out of the Yarra Valley Classic at Melbourne Park Friday with a right shoulder injury just days before the Australian Open.

The 39-year-old showed no ill effects from the issue and overcame fellow American Danielle Collins 6-2, 4-6, 10-6 to set up a semi-final showdown with world No 1 Ashleigh Barty.

But hours later she withdrew from the tournament.

“Serena Williams has withdrawn from the Yarra Valley Classic singles draw due to a right shoulder injury,” the WTA said on Twitter.

Williams is aiming for a record-equalling 24th Grand Slam title at the Australian Open and had been in good form so far in Melbourne.

“Look forward to seeing you back on court next week,” the Australian Open said on its official Twitter account.

Serena beat Danielle Collins to set up a semi-final showdown with Barty as warm-up tournaments for the Grand Slam resumed Friday after a coronavirus scare.

Williams and Barty ground out tough wins at the Yarra Valley Classic, but a teary-eyed Australian Open champion Sofia Kenin lost a repeat of last year’s final against Garbine Muguruza in straight sets.

Williams, 39, had been in ominous form but needed to overcome a mid-match wobble to oust fellow American Collins in 96 minutes.

“I have nothing to lose against her... it’s going to be a good match,” Williams said about Saturday’s contest with Barty.

The 23-time Grand Slam champion broke three times in a dominant first set and appeared to be cruising until unexpectedly dropping her serve in the seventh game, as Collins forced a super tiebreaker.

Williams, aiming for a record-equalling 24th Grand Slam title at the Australian Open, regrouped and finished the match by hitting her 24th winner.

(With AFP inputs)