Third-seeded Rafael Nadal battled back from a break down in the final set to defeat Grigor Dimitrov 6-4 4-6 6-3 to reach the Swiss Indoors quarter-finals.
But second seed Stan Wawrinka suffered his eighth first-round loss at the tournament as the French Open champion slumped to a 3-6 7-6 (7-2) 6-4 defeat to Ivo Karlovic.
Nadal won the opening set against Dimitrov but dropped the second after leading 4-2.
When he dropped serve in the opening game of the third set on a double-fault, the situation looked grim for the Spaniard.
But the 14-time major winner broke back for 5-3 with a winning overhead, serving out the tight victory a game later after more than two hours on court.
“This was another very tough match, I had to fight,” said Nadal.
“I’m very happy to be in the quarter-finals. Winning like this gives me confidence after my second important win this week.”
Nadal next faces either Marin Cilic or Teimuraz Gabashvili for a semi-final spot.
Karlovic sent down 21 aces to take victory over Wawrinka after trailing a set and a break.
The 36-year-old Croatian Karlovic, who had lost five of six previous meetings with Wawrinka, next plays Serbia’s Dusan Lajovic.
Wawrinka was disappointed to have let it slip away.
“It’s never easy to lose a match like that, especially since I felt I was playing well and feeling good. I had my chances to take control of the match,” said the Swiss.
Elsewhere in the opening round, fourth seed Kevin Anderson advanced over Croatian teenager Borna Coric 6-3 6-2 while seventh seed and last weekend’s Moscow champion Cilic beat Basel native Marco Chiudinelli 6-3 7-6 (7-3).
Jack Sock won an American battle with Denis Kudla 6-4 6-2 and next faces countryman John Isner, the sixth seed.
Russia’s Gabashvili stopped Argentina Leonardo Mayer 7-5 4-6 6-4.
In the second round, 2014 finalist David Goffin made the quarter-finals with a 6-4 6-3 win over Adrian Mannarino.