Defending champion Roger Federer rode his luck to battle past fellow Swiss Stanislas Wawrinka a 6-3, 6-7, 7-5 and reach the quarter-finals of the BNP Paribas Open on Wednesday.
Federer, a four-times champion at Indian Wells, appeared to be in cruise control when serving for the match at 5-4 in the second set but was broken to love before his opponent went on to clinch the tiebreak 7-4.
The players traded early breaks of serve in the third set before Federer sealed the win by again breaking Wawrinka in the 12th game when his Davis Cup partner netted a forehand.
"I definitely got a bit lucky here tonight," Federer said courtside after coming out on top of a fluctuating contest lasting two hours 20 minutes.
"But I'm very happy to come through against Stan, who is a very good friend of mine."
Federer, who improved his record against Wawrinka to 13-1, will next face either twice champion Rafa Nadal of Spain or Latvian qualifier Ernests Gulbis, who play later in the day.
In other matches, sixth-seeded Czech Tomas Berdych eased past Frenchman Richard Gasquet 6-1 7-5 while eight-seeded Jo-Wilfried Tsonga came from a set down to beat Canada's Milos Raonic 4-6 7-5 6-4.
In a showdown between two power servers, Raonic blasted down 12 aces to Tsonga's seven but the Canadian made a double fault when serving at 30-40 for the contest to end in just under two hours.
Earlier, big-serving South African Kevin Anderson became the first player to reach the last eight, and his second ATP Masters 1000 quarter-final, with a 6-3 1-6 6-4 victory over Frenchman Gilles Simon.