South Africa's Kevin Anderson reached the quarter-finals of Portugal's Estoril Open after a straight-sets win over Spain's Roberto Carballes Baena on Wednesday.
Anderson won the second round encounter 6-3, 7-6 (7/4) in one hour and 49 minutes.
But it was a nervy ending to the match for the world No 105, who squandered no fewer than five match points while serving for the match at 5-4 in the second set.
Carballes Baena, the world No 93, broke back and when he led 4-2 in the tie-break, a third set looked a distinct possibility. Anderson, though, had other ideas and won the next five points to close out the contest.
Anderson was initially scheduled to face Japan's Kei Nishikori, but the former world No 4 withdrew with a right abductor injury, handing Carballes Baena a spot in the main draw as a lucky loser from qualifying.
Anderson's serve proved the difference - the tall South African served 12 aces compared to none of his opponent.
He also got 67% of his first serves into play, while winning 79% of those points.
"I thought I played a really good match... I gave away too many match points... but to be able to reset and still close it out was a positive for me," Anderson said in an on-court interview.
Anderson, who beat American Frances Tiafoe in the first round, will next face sixth seeded Croatian Marin Cilic, who rallied to beat Portuguese qualifier Nino Borges 6-7 (5/7), 6-4, 6-4.
Meanwhile, South Africa's other singles contestant, Lloyd Harris, suffered a first round defeat to Italian Marco Cecchinato on Tuesday.
Cecchinato, the world No 94, won in straight sets, 6-3, 6-4, against the 53rd-ranked Harris.
In the doubles, South Africa's Raven Klaasen and his Japanese partner Ben McLachlan are the second seeds. They opened their account with a 6-2, 6-3 win over Italy's Simone Bolelli and Argentina's Maximo Gonzalez on Wednesday.