World number three Roger Federer had to come from behind to beat Canada's Milos Raonic 6-7 (4/7), 6-2, 6-4 in the third round of the ATP/WTA Indian Wells tournament on Tuesday.
The 30-year-old Swiss, who won three straight Indian Wells titles from 2004-2006, came into the California desert in strong form following back-to-back wins in Rotterdam and Dubai.
But facing the 21-year-old Raonic for the first time, Federer fell a set behind as he struggled to adjust to the hard-serving Canadian's game.
"It was a difficult match," Federer said. "I have never played him before. He has probably seen me play a whole lot on TV which helps him out a bit."
Federer hammered 10 aces, won 88 percent of his first-serve points and saved three out of three break points in the two hour, seven minute match, but was made to work for his win.
"I really did well," Federer said. "I hung in there and played great in the second set. The third set was close and I am glad to be moving on in this tournament."
Federer broke Raonic in the seventh game of the third set to go up 4-3. With Raonic serving at 30-30 Federer dug low to snag a 219kmph (136mph) service return, which Raonic then failed to get back over the net.
Federer took the game on the next point with a backhand passing shot down the line, and then took his first match point when Raonic pounded a forehand into the net in front of the 15,000-strong crowd at the Indian Wells Tennis Garden.
In defeat Raonic, who has won two titles this season, showed why he is considered one of the rising stars on the ATP Tour, matching his opponent for aces in what was just his third loss in 19 matches so far this season.
"I think he played really well," Federer said. "He is going to be a future top 10 player and a whole lot better. He did very well tonight under pressure."
Raonic has five wins over players in the top ten but he is still hunting his first victory over a top eight player.
He served almost flawlessly in the first set as he closed out three games with aces.
Despite the loss, Raonic said he had enjoyed being on centre court against the 16-time Grand Slam winner.
"I was there competing with what people say was the greatest player of all-time," Raonic said.
He won the fifth game of the opening set by blasting a 217kmph (135mph) service winner as his serve topped out at 228kmph (142mph) in the match.
Federer will face Thomaz Bellucci of Brazil in the fourth round who advanced earlier Tuesday when Russian Nikolay Davydenko pulled out with a virus.
Federer said he thought he had flu earlier in the week but was feeling much better after his win Tuesday.
"It has been a tough week with many players being sick so it is so nice to be healthy and play good tennis," Federer said.