PHOENIX -- Shortstop Stephen Drew underwent successful surgery on his fractured right ankle on Thursday.

"Stephen Drew underwent orthopedic surgery in Phoenix this afternoon to repair a severe right ankle injury he suffered yesterday," team physician Michael Lee said in a statement. "Dr. Peter Mitchell performed internal plating to the fibula bone and repair of the ligaments torn as his cleats caught the ground, twisting the ankle awkwardly. All went as expected, and we are optimistic for a full recovery."

Drew was injured in the fourth inning of Wednesday's game when he slid into home trying to score from second base.

The injury means that for the rest of the season, the D-backs will be without a main cog in their lineup and an outstanding defender at shortstop as they try to catch the Giants in the National League West race.

"We knew all along that it would probably be difficult for us if we lost one of our core players," general manager Kevin Towers said. "The injury that took place [on Wednesday] night was unfortunate, but it happens, and you turn the page and you deal with it. Other teams have faced similar things this season with injuries to their core players."

Drew was hitting .252 with 21 doubles, five triples, five homers and 45 RBIs at the time of the injury.

"Stephen will bounce back," manager Kirk Gibson said. "He's resilient. It's going to be tough, just like whenever you have surgery like that. I'm sure the recovery won't be fun. You'll get bored with it, you'll get frustrated because you want to play, but you'll just have to keep on pace so you have a rapid recovery, because you don't want to push things."