ROME, Italy - Daria Gavrilova will take on Maria Sharapova in the third round after triumphing against reigning Wimbledon champion Garbiñe Muguruza in a late-night thriller at the Internazionali BNL d'Italia.

The Aussie needed over three hours to come back from a set down and recover from a 0-4 deficit in the third, winning 5-7, 6-2, 7-6(6) in a match which began on Wednesday night and ended in the early morning hours on Thursday, just past 2:00 am.

Gavrilova found her serve under attack in a marathon eight-minute game at 3-2 that set the tone of the match early on. Muguruza had three break chances but couldn’t convert as the Aussie held firm. Muguruza seemed to deflate after that, being broken in the very next game as Gavrilova took advantage of the letdown.

She held points for a 5-2 lead, but Muguruza shook off the slump just in time to come roaring back. The Spaniard broke straight back, then reeled off three games in a row to close out the set.

Muguruza couldn’t keep up the level heading into the second as Gavrilova quickly built up a 3-0 lead. Another lengthy game - this time 12 minutes long, with Muguruza bringing up seven break chances - tested the Gavrilova serve but she held on to extend her lead to 5-2 and take the set.

In the third, Muguruza looked to be firmly in control as an increasingly tired looking Gavrilova misfired to give her opponent a daunting double break, 4-0 lead. But Gavrilova never gave up, holding serve at 4-1 to stop the rot and take the wind out of Muguruza’s sails. She went on to reel off four games in a row to get ahead 5-4, earning her first lead of the set.

A pair of back to back breaks - with Gavrilova breaking Muguruza from match point down - sent the match into a third set tiebreaker. They were toe to toe throughout the decider, which saw Gavrilova save a second match point, before finally edging ahead and winning the last three points in a row to close out the marathon match. At three hours and nine minutes, it clocks in at the fourth longest WTA match of the year so far.

The victory over World No.3 Muguruza is Gavrilova’s first Top 10 win of the year, and her fourth career Top 5 victory. Even more sweet, it’s her first back-to-back match wins since Acapulco in February.

Gavrilova is rewarded with a matchup against former World No.1 and three-time Rome champion Maria Sharapova in the next round.