Andy Roddick falls over as he injures his foot during match against Denis Kudla in the SAP Open tennis tournament in San Jose, Calif., Wednesday, Feb. 15, 2012. He continued to play. (AP Photo/Paul Sakuma)— AP

+Read Caption

Andy Roddick falls over as he injures his foot during match against Denis Kudla in the SAP Open tennis tournament in San Jose, Calif., Wednesday, Feb. 15, 2012. He continued to play. (AP Photo/Paul Sakuma)
/ AP

Andy Roddick falls over as he injures his foot during match against Denis Kudla in the SAP Open tennis tournament in San Jose, Calif., Wednesday, Feb. 15, 2012. He continued to play. (AP Photo/Paul Sakuma)— AP

+Read Caption

Andy Roddick falls over as he injures his foot during match against Denis Kudla in the SAP Open tennis tournament in San Jose, Calif., Wednesday, Feb. 15, 2012. He continued to play. (AP Photo/Paul Sakuma)
/ AP

Andy Roddick falls over as he injures his foot during match against Denis Kudla in the SAP Open tennis tournament in San Jose, Calif., Wednesday, Feb. 15, 2012. He continued to play. (AP Photo/Paul Sakuma)— AP

+Read Caption

Andy Roddick falls over as he injures his foot during match against Denis Kudla in the SAP Open tennis tournament in San Jose, Calif., Wednesday, Feb. 15, 2012. He continued to play. (AP Photo/Paul Sakuma)
/ AP

Andy Roddick is taped after he fell over and injured his foot during match against Denis Kudla in the SAP Open tennis tournament in San Jose, Calif., Wednesday, Feb. 15, 2012. He continued to play. (AP Photo/Paul Sakuma)— AP

+Read Caption

Andy Roddick is taped after he fell over and injured his foot during match against Denis Kudla in the SAP Open tennis tournament in San Jose, Calif., Wednesday, Feb. 15, 2012. He continued to play. (AP Photo/Paul Sakuma)
/ AP

SAN JOSE, Calif. 
Andy Roddick overcame a right ankle injury and a troublesome right hamstring Wednesday night, rallying past Ukrainian-born American Denis Kudla 6-7 (5), 7-6 (5), 6-4 in the second round of the SAP Open.

Almost a month since he retired in the second round of the Australian Open with a slight tear in his hamstring, Roddick injured his ankle running to his right late in the second set. He crumbled to the floor, pulled his hands over his hat and let out a painful roar that echoed around the arena.

Roddick regrouped with a brace around his hamstring, won the second-set tiebreaker after Kudla double-faulted and came back from 2-0 down in the final set for the victory.

"The best thing I did was just exist out there," Roddick said.

Roddick's return to the court had more drama than he could've imagined.

The bold and brash American complained of the flashing video board that hangs from the arena's rafters, stopped play more than once while flashbulbs on fans' cameras or phones popped, squeaked his shoes between points on the indoor surface and had his share of words with line judges - even shaking his head and walking off after a video replay didn't go his way.

All those worries faded late in the second set.

Running to his right along the baseline to chase down a ball while up 5-4, Roddick pulled up limp. He dropped to the ground and the arena fell silent for several seconds until his agonizing grunts.

After a brief medical timeout, Roddick rallied in impressive fashion.

Roddick still had more of a plodding than polished pace - which showed even before the ankle injury - but his hard-hitting serve found the lines and so did his passing shots. He put the pressure back on the go-for-broke Kudla, who sailed a serve wide for a double fault and then another passing shot out to hand Roddick the final two points of the second-set tiebreaker.

Even then, Kudla controlled the pace.

Both players held serve until Kudla broke Roddick to go ahead 2-0 in the final set. Roddick immediately broke back, and followed with a series of slices and spins to stay along the baseline to break again at 4-3.

Roddick held on to advance to the third round. He'll get an extra day of rest and won't play again until Friday, facing the winner of the Denis Istomin-Michael Russell match.

Roddick, who had a first-round bye, partially tore a tendon in his hamstring against Lleyton Hewitt on Jan. 19. He was injured in the second set against Hewitt, played 16 more games before retiring and has only practiced sparingly since.

This time, he survived.

And the rest of the field suddenly looks a lot less daunting.

Earlier in the day, top-seed Gael Monfils of France withdrew with right knee inflammation. He also plans to withdraw from next week's ATP Tour stop in Memphis.

Ryan Harrison advanced to the second round by upsetting eighth-seeded Olivier Rochus of Belgium 4-6, 6-2, 6-3. The 19-year-old American rallied past Rochus from 3-1 down in the third set to win the final five games.