ISTANBUL (AP) — Unseeded Diego Schwartzman staged a stunning comeback Sunday to upset second-seeded Grigor Dimitrov of Bulgaria 6-7 (5), 7-6 (4), 6-0 and claim his maiden ATP Tour title at the Istanbul Open.

Playing his first final, the Argentine was trailing 5-2 in the second set before winning four straight games. Schwartzman failed to serve the set out but prevailed in the tiebreaker, before dominating the third set with three breaks and completing the victory in 2 hours, 47 minutes.

In his best week on the tour, Schwartzman knocked out top-seeded Bernard Tomic in the second round before saving a match point in the quarterfinals against Damir Dzumhur. In the semifinals, he upset fourth-seeded Federico Delbonis.

It was the eighth final for Dimitrov who won four titles, the last one in Queen's Club in London in 2014.

Dimitrov said he had cramp when he was close to taking the second set.

"It was very unfortunate that I couldn't close out the match," Dimitrov said. "I have to give credit to Diego."

Dimitrov broke Schwartzman four times in the first set but the Argentine always fought back with a re-break, forcing a tiebreaker. Dimitrov finally won the set, converting his second set point.