BOISE — Novak Djokovic survived a scary ankle twist and streamrolled Sam Querrey the final two sets to give Serbia an insurmountable 3-1 lead against the USA in its quarterfinal Davis Cup contest at Boise State University's Taco Bell Arena.

Top-ranked Djokovic beat No. 20 Querrey 7-5, 6-7 (4-7), 6-1, 6-0 in 2:35, his second point of the weekend.

At 1-1 in the first set with Querrey serving, Djokovic twisted his right ankle during a long rally he lost.

He grimaced, fell to the court and was helped to his changeover chair where his ankle was re-taped during a medical timeout.

"It couldn't happen in a worse moment," Djokovic said.

Looking at times tentative once he returned, the Serb was able to break Querrey twice in the first set, saving two break points on his own serve in the final game.

Neither man lost serve in the second, but Querrey struck back when Djokovic played two loose points at 4-5 on his serve in the tiebreaker.

In the third set, Djokovic picked up the pace. He attacked more forcefully and his movement seemed less affected. He won 12 of the last 13 games.

Querrey was hampered by a sore pectoral muscle that inhibited his serving.

"I'm very happy that I managed to play the whole match and that I played really well in the third and fourth,' said Djokovic, who didn't know if he would be able to continue but was aided by anti-inflammatories that kicked in at the end of the second set.

Djokovic added that he had never twisted his ankle in such a way and felt responsible to keep playing for his country in the sport's only team competition.

"I sincerely hope that I didn't make it worse," he said.

Serbia entered the final day with a 2-1 lead after Nenad Zimonjic and Ilija Bozoljac outlasted the No. 1 ranked team of Bob and Mike Bryan 7-6 (7-5), 7-6 (7-1), 5-7, 4-6, 15-13.