BOGOTÁ, Colombia -- Lucky loser Kristie Ahn of the United States pulled off a shocking upset in the first round of the Claro Open Colsanitas on Tuesday night, fending off two match points and fighting past No.1 seed Jelena Ostapenko of Latvia, 2-6, 7-6(5), 7-5.

"It was a really tense match," Ahn said, following her dramatic victory. "Obviously playing in altitude is really difficult for both of us, but I was just really happy to come out with the win and fight for every point."

The 205th-ranked American came back from 6-2, 4-2 down to pull the match into a decisive third set, then evaded two match points near the conclusion of the clash to stun the 2017 French Open champion after two hours and 31 minutes of play, and pick up a victory in her first WTA main draw match of the season.

Photos: Vive la difference! 16 titles, 16 winners in 2019 so far

Ahn had lost in the final round of qualifying to Bibiane Schoofs before receiving a reprieve into the main draw after multiple withdrawals, but she came out on top today, winning 58 percent of points on Ostapenko's second serve. Ostapenko out-winnered Ahn by 26 to 11, but the top seed also had 56 unforced errors, including a whopping 16 double faults.

Ahn will face a rising local star in the second round: 17-year-old Colombian wild card María Camila Osorio Serrano. The teenager dispatched Switzerland’s Conny Perrin in straight sets on Monday to earn her first-ever WTA main-draw match victory.

"Obviously she’s an incredible competitor," Ahn said, when looking forward to her second-round encounter. "The Colombian girls play so well here, they know the courts better than anyone, and having the home crowd behind her -- I think it will be a fun match."

Ostapenko got off to a roaring start in the first set, as her overwhelming returns and groundstrokes were then too hot for Ahn to handle. Ostapenko jumped out to a 4-0 lead after a stunning service return allowed her to break Ahn at love.

The Latvian gave one break back, dropping serve in the next game due to two double faults, and Ahn used that to spur herself on to a love hold for 4-2. But that would be the extent of Ahn’s scoreboard presence in the opening frame, as the searing Ostapenko service returns propelled her to another love break at 5-2, garnering her the one-set lead.

But the tables turned in the second set, as Ostapenko used those scintillating shots to twice go up a break at 2-0 and 4-2, but in each instance let the breaks go due to mounting unforced errors. By contrast, the Ahn service effectiveness increased, and once the American got back on serve at 4-3, she did not face a break point for the remainder of the set.

In the second-set tiebreak, Ostapenko dropped three points in a row with errors to hand Ahn a commanding 5-1 lead, but two forehand errors on Ahn’s service points contributed to Ostapenko fighting back to 5-5. However, an ace by Ahn pulled her to 6-5 and set point, and the American converted her chance when Ostapenko fired a forehand miscue long.

Ahn’s momentum continued at the start of the decider, when she broke Ostapenko for a 2-0 lead after the Latvian double faulted on break point.  But Ostapenko rebounded with a quick break back for 2-1 as a tense final set got underway.

After a number of service holds in a row, Ostapenko went up a break to lead 5-4, finishing a game-ending really with an error-forcing forehand. Serving for the match, the top seed held two match points, but she double faulted both of those chances away. On the third break point of that game, Ostapenko double faulted again, and Ahn was suddenly back at 5-5.

Ahn refused to let Ostapenko relax, quickly holding for 6-5. Ostapenko started the next game with her 16th double fault, and Ahn raced to triple match point. Ostapenko saved all three and used her fierce forehand to garner two game points, but the Latvian ended the final three points with unforced errors, and Ahn clinched a topsy-turvy upset win.