New York, United States, 29 August 2019 | Matt Trollope

Ash Barty advanced to the third round of the US Open with a hard-fought win over Lauren Davis on Wednesday night.

The No.2 seed required four match points — after saving a set point — to eventually see off the American 6-2 7-6(2) in a match lasting more than two hours at Louis Armstrong Stadium.

Barty progresses to a third-round meeting with the winner of the match between 30th seed Maria Sakkari and Chinese qualifier Peng Shuai.

That match is yet to be played due to rain washing out the entire day’s play on the outside courts at Flushing Meadows.

“When I saw it was raining today I was pretty happy that we were on this beautiful court with the roof,” Barty said during her on-court interview.

“I knew I was doing the right things (tonight), it was just a bit about execution. It’s difficult conditions out here but very happy to be able to come through and play a really good tiebreak there.”

After dropping the first set 6-1 in her opening match against Zarina Diyas on Monday, Barty ensured there was no repeat of a similarly slow start when she broke Davis in the second game to go ahead 2-0.

After a mammoth game featuring seven deuces, Barty broke again to extend her lead to 3-1, and ran away with the first set.

The second stanza was trickier, with Davis — notable for her pushing Simona Halep to 15-13 in the third set of their third-round epic at Australian Open 2018 — breaking the Australian’s serve in the fifth game and saving three break points in the next game to push ahead 4-2.

She eventually served for the set at 5-4 and arrived at set point — only for Barty to elevate her game and escape.

Three match points came and went for the French Open champion in the 12th game before Barty raced away in the tiebreak against an increasingly dispirited Davis.

The victory improves Barty’s 2019 win-loss record to an impressive 44-8 and keeps her on track to take back the No.1 ranking from Naomi Osaka, the defending champion.

With Barty reaching the third round, Osaka must win the US Open for the second straight year to hold onto top spot, while the two other players in the running, Karolina Pliskova and Simona Halep, must respectively reach the semifinals and win the title to have any shot at No.1.

“I feel I’ve had a very consistent year and we’ve earned the position where we are in the rankings,” Barty said.

“But I’m just looking forward to my next match now.”