UMAG, Croatia (AP) Gastao Elias won a dramatic tiebreaker to upset top-seeded Pablo Cuevas of Uruguay in the second round of the Croatia Open on Thursday.

The 72nd-ranked Portuguese rallied to beat 2014 champion Cuevas 3-6, 6-3, 7-6 (7) and reach his third quarterfinal this year after a grueling battle from the baseline.

Cuevas was on the brink of defeat even before the tiebreaker, trailing 3-5 in the third set. The Uruguayan then won three games in a row, losing only three points and appearing to be in command.

But Elias saved a match point at 6-7 in the tiebreaker, clinching victory with three consecutive points.

Elias next faces sixth-seeded Pablo Carreno Busta of Spain who defeated Russia's Teymuraz Gabashvili 6-4, 6-2.

Second-seeded Joao Sousa ousted Leonardo Mayer of Argentina 7-5, 7-6 (1). Sousa was 2-5 down in the second set and saved two set points in the 10th game. Mayer had a disastrous tiebreaker - winning the opening point before losing the next seven.

Andrej Martin rallied to defeat seventh-seeded Martin Klizan 3-6, 7-5, 6-2 in an all-Slovak match.

Klizan won his fifth career title last week in Hamburg and had won 12 straight sets, including the first set against Martin.