Djokovic struggles to win in Calif.

Novak Djokovic built up a head of steam while losing nine consecutive games over two sets. He let it out by tossing his ballcap after finally winning a game in the third.

"If I could pull my hair off, I would do it in that moment,” he said.

That wasn’t the only trouble the world’s No. 2 player ran into Monday.

Djokovic staved off triple match point in the third to beat Philipp Kohlschreiber of Germany 6-3, 2-6, 7-6 (3) in third-round play at the BNP Paribas Open.

U.S. Davis Cup teammates John Isner and Sam Querry were to meet in a night match, after Kim Clijsters continued her comeback against Alisa Kleybanova of Russia.

Djokovic’s countrywoman, sixth-seeded Jelena Jankovic, needed nearly three hours to get by Sara Errani of Italy, 2-6, 7-6 (6), 6-4. Defending champion Vera Zvonareva advanced with a 6-2, 6-3 win over Anastasija Sevastova of Latvia.

Djokovic, the 2008 champion, trailed love-40 on his serve in the 10th game, but got back into the match mostly on Kohlschreiber’s mistakes. The Serb’s forehand volley winner saved the first match point, then Kohlschreiber wasted two consecutive backhands for deuce.

Djokovic’s ace and subsequent double-fault led to a second deuce before two straight errors by the German tied the set at 5-all.

"When I needed to, I did the work, served well and made some good approaches from the forehand side,” Djokovic said. "He could easily be the winner of this match and he would deserve it.”

Kohlschreiber held for his last lead at 6-5, then Djokovic served a love game.

The Serb led 4-0 in the tiebreak before closing out the 2 1/2-hour match with a forehand winner. Both players struggled with errors in the midday desert sun, with Kohlschreiber committing 51 to 43 for Djokovic.

Defending champion and third-ranked Rafael Nadal needed just over an hour to put away Mario Ancic of Croatia, 6-2, 6-2, in front of a sparse stadium court crowd.

Nadal lost just one first-serve point and never faced a break point in beating Ancic for the fourth time in five meetings. The Spainard kept the rallies brief, with many not lasting more than five strokes.

"The serve was important, but more important was my rhythm from the baseline,” he said. "I lost only a few points because I didn’t have mistakes, only seven unforced errors in two sets and 29 winners, that’s very good statistics.”

Nadal wore a pair of brown-and-white shorts with a lattice-type pattern and a white shirt with pink highlights.

"It’s more different than usual. That’s the thing, no?” he said about his shorts. "It was a little bit fashion for me. Is too much, a little bit for me, but going to be for this tournament.”

Djokovic was still delighted about meeting Pete Sampras for the first time last week, the 14-time Grand Slam champion whom he called his "lifetime idol.”

"He’s the one that gave me a lot of motivation to became a professional player because I didn’t have anyone playing tennis in my family. I had to do it myself,” Djokovic said.

The 22-year-old went into the meeting believing it was no big deal

"But it was incredible,” he said. "He tells you, `You win with your mind and your heart.’ He promised to hit with me.”

In minor upsets, 17th-seeded Shahar Peer of Israel beat ninth-seeded Flavia Pennetta of Italy, 6-4, 6-7 (4), 6-1; Carla Suarez Navarro of Spain defeated No. 27 Agnes Szavay of Hungary, 6-4, 3-6, 6-1; No. 21 Juan Monaco of Argentina beat No. 11 Juan Carlos Ferrero of Spain, 7-6 (2), 3-6, 6-3; and Guillermo Garcia-Lopez of Spain got by No. 26 Thomaz Bellucci of Brazil, 4-6, 6-2, 6-1.