Barty had a much easier time than in the previous round, when she saved a match point to beat qualifier Kristina Kucova. That was Barty’s first match away from her native Australian since February 2020.
She kept Ostapenko on the move and on the defensive, pulling her in and moving her from side to side.
Barty is the defending champion as the 2019 winner. The tournament was canceled last year at the start of the coronavirus pandemic.
Her potential path to the final became easier when No. 3-seeded Simona Halep withdrew before her third-round match because of a right shoulder injury.
“I wanted to come here to give my best and play many matches, but unfortunately I can’t,” Halep said in a statement.