ROME, Italy - No.9 seed Sloane Stephens fought through a second consecutive three-setter in two hours and 17 minutes, making the third round of the Internazionali BNL d'Italia for the first time since 2013 with a 6-0, 5-7, 6-4 defeat of qualifier Kaia Kanepi.

The result was a belated revenge for their only previous encounter, in the first round of Estoril in 2012, when the Estonian had routed a 19-year-old Stephens 6-1, 6-0. For half an hour today, it looked as though the American's payback would be equally emphatic as she sped out to a 6-0, 2-0 lead, permitting Kanepi just 15 points in the opening eight games.

Repeatedly outmanoeuvring her 32-year-old opponent, Stephens maintained impeccable depth in neutral rallies and was able to expose Kanepi's sluggish movement by steering the ball from line to line. The World No.59 did not help her own cause with a litany of unforced errors and some spectacularly ill-timed double faults: a first down break point in the first game, a second to bring up another break point in the third game, and a fourth down break point in the fifth game.

Seemingly cruising towards the finish line, Stephens lapsed momentarily into carelessness in the third game of the second set, as loose errors off both wings aided a first Kanepi hold. That was all the encouragement the six-time Grand Slam quarterfinalist needed, though. Suddenly, her heavy groundstrokes were finding their mark - and instead of being yanked around the court by the US Open champion, Kanepi was bullying her with pace and spin.

Five out of six games went the Estonian No.2's way as she continued to fire winners from both wings, taking her to the brink of levelling the match. Despite a relapse into wild error as she tried to serve it out, getting broken to love, and missing three set points on Stephens' serve in the following game, Kanepi continued to play with renewed confidence and played two stellar games to snatch an unlikely set 7-5.

Kaia Kanepi fires a backhand during her second-round loss to Sloane Stephens at the Internazionali BNL d'Italia (Getty)

The match hung in the balance over the three tight deuce games that opened the decider, with momentum swinging from one player to the other as both sought to pull away. Kanepi fended off three break points in the first game, counteracting a seventh double fault with a first ace; Stephens responded by staving off two break points in the next game with laser forehands.

An eighth double fault, though, paved the way for the Miami champion to break through in the third game as Kanepi found the net with a forehand - and all of a sudden, the first-set dynamic returned as Stephens leapt to a 5-2 lead.

Sloane Stephens prepares for an overhead in the second round of the Internazionali BNL d'Italia (Getty)

The drama wasn't done yet, though. The 25-year-old spurned a first match point with her first double fault, and once again Kanepi seized the lifeline with gusto. But although the four-time WTA titlist had a break point to level the scoreline at 5-5, a brilliant all-court rally ended with Stephens putting a backhand volley away.

When Kanepi's consistency broke down to send another forehand into the net on Stephens' third match point, the American's reaction was one of relief after dodging a bullet.